{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 高德地图web服务的API调用（使用python）\n",
    "## 一、导入模块和key值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import json\n",
    "import requests\n",
    "from pandas import json_normalize\n",
    "key_wenpur =\"99161aee834f35a9b8b9b54b42b10f24\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.0地理编码：\n",
    "### 将详细的结构化地址转换为高德经纬度坐标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'status': '1', 'info': 'OK', 'infocode': '10000', 'count': '1', 'geocodes': [{'formatted_address': '广东省湛江市徐闻县徐闻第一中学', 'country': '中国', 'province': '广东省', 'citycode': '0759', 'city': '湛江市', 'district': '徐闻县', 'township': [], 'neighborhood': {'name': [], 'type': []}, 'building': {'name': [], 'type': []}, 'adcode': '440825', 'street': [], 'number': [], 'location': '110.156530,20.326210', 'level': '兴趣点'}]}\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>formatted_address</th>\n",
       "      <th>country</th>\n",
       "      <th>province</th>\n",
       "      <th>citycode</th>\n",
       "      <th>city</th>\n",
       "      <th>district</th>\n",
       "      <th>township</th>\n",
       "      <th>adcode</th>\n",
       "      <th>street</th>\n",
       "      <th>number</th>\n",
       "      <th>location</th>\n",
       "      <th>level</th>\n",
       "      <th>neighborhood.name</th>\n",
       "      <th>neighborhood.type</th>\n",
       "      <th>building.name</th>\n",
       "      <th>building.type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>广东省湛江市徐闻县徐闻第一中学</td>\n",
       "      <td>中国</td>\n",
       "      <td>广东省</td>\n",
       "      <td>0759</td>\n",
       "      <td>湛江市</td>\n",
       "      <td>徐闻县</td>\n",
       "      <td>[]</td>\n",
       "      <td>440825</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>110.156530,20.326210</td>\n",
       "      <td>兴趣点</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  formatted_address country province citycode city district township  adcode  \\\n",
       "0   广东省湛江市徐闻县徐闻第一中学      中国      广东省     0759  湛江市      徐闻县       []  440825   \n",
       "\n",
       "  street number              location level neighborhood.name  \\\n",
       "0     []     []  110.156530,20.326210   兴趣点                []   \n",
       "\n",
       "  neighborhood.type building.name building.type  \n",
       "0                []            []            []  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "徐一地理编码: 110.156530,20.326210\n"
     ]
    }
   ],
   "source": [
    "def geocode(address,city=None,batch=None):\n",
    "\n",
    "    url = 'https://restapi.amap.com/v3/geocode/geo?parameters'\n",
    "    params = {\n",
    "        'key':key_wenpur,\n",
    "        'address':address,\n",
    "        'city':city,\n",
    "        'batch':batch,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params) # requests实现get请求传参\n",
    "    data = response.json() # 返回json格式\n",
    "    return data\n",
    "    \n",
    "徐一 = geocode(address='广东省湛江市徐闻县徐闻第一中学') # 调用函数，传实参\n",
    "print(徐一)\n",
    "df_徐一 = json_normalize(徐一['geocodes']) # json_normalize返回DataFrame\n",
    "display(df_徐一)\n",
    "徐一地理编码 = 徐一['geocodes'][0]['location'] # 切片索引\n",
    "print(\"徐一地理编码:\",徐一地理编码)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.1逆地理编码：\n",
    "### 将经纬度转换为详细结构化的地址，且返回附近周边的POI、AOI信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'status': '1', 'regeocode': {'addressComponent': {'city': '湛江市', 'province': '广东省', 'adcode': '440825', 'district': '徐闻县', 'towncode': '440825113000', 'streetNumber': {'number': '326号', 'location': '110.15896,20.3281681', 'direction': '东北', 'distance': '334.087', 'street': '进港公路'}, 'country': '中国', 'township': '南山镇', 'businessAreas': [[]], 'building': {'name': [], 'type': []}, 'neighborhood': {'name': [], 'type': []}, 'citycode': '0759'}, 'formatted_address': '广东省湛江市徐闻县南山镇进港公路'}, 'info': 'OK', 'infocode': '10000'}\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>status</th>\n",
       "      <th>info</th>\n",
       "      <th>infocode</th>\n",
       "      <th>regeocode.addressComponent.city</th>\n",
       "      <th>regeocode.addressComponent.province</th>\n",
       "      <th>regeocode.addressComponent.adcode</th>\n",
       "      <th>regeocode.addressComponent.district</th>\n",
       "      <th>regeocode.addressComponent.towncode</th>\n",
       "      <th>regeocode.addressComponent.streetNumber.number</th>\n",
       "      <th>regeocode.addressComponent.streetNumber.location</th>\n",
       "      <th>...</th>\n",
       "      <th>regeocode.addressComponent.streetNumber.street</th>\n",
       "      <th>regeocode.addressComponent.country</th>\n",
       "      <th>regeocode.addressComponent.township</th>\n",
       "      <th>regeocode.addressComponent.businessAreas</th>\n",
       "      <th>regeocode.addressComponent.building.name</th>\n",
       "      <th>regeocode.addressComponent.building.type</th>\n",
       "      <th>regeocode.addressComponent.neighborhood.name</th>\n",
       "      <th>regeocode.addressComponent.neighborhood.type</th>\n",
       "      <th>regeocode.addressComponent.citycode</th>\n",
       "      <th>regeocode.formatted_address</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>OK</td>\n",
       "      <td>10000</td>\n",
       "      <td>湛江市</td>\n",
       "      <td>广东省</td>\n",
       "      <td>440825</td>\n",
       "      <td>徐闻县</td>\n",
       "      <td>440825113000</td>\n",
       "      <td>326号</td>\n",
       "      <td>110.15896,20.3281681</td>\n",
       "      <td>...</td>\n",
       "      <td>进港公路</td>\n",
       "      <td>中国</td>\n",
       "      <td>南山镇</td>\n",
       "      <td>[[]]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0759</td>\n",
       "      <td>广东省湛江市徐闻县南山镇进港公路</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1 rows × 22 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  status info infocode regeocode.addressComponent.city  \\\n",
       "0      1   OK    10000                             湛江市   \n",
       "\n",
       "  regeocode.addressComponent.province regeocode.addressComponent.adcode  \\\n",
       "0                                 广东省                            440825   \n",
       "\n",
       "  regeocode.addressComponent.district regeocode.addressComponent.towncode  \\\n",
       "0                                 徐闻县                        440825113000   \n",
       "\n",
       "  regeocode.addressComponent.streetNumber.number  \\\n",
       "0                                           326号   \n",
       "\n",
       "  regeocode.addressComponent.streetNumber.location  ...  \\\n",
       "0                             110.15896,20.3281681  ...   \n",
       "\n",
       "  regeocode.addressComponent.streetNumber.street  \\\n",
       "0                                           进港公路   \n",
       "\n",
       "  regeocode.addressComponent.country regeocode.addressComponent.township  \\\n",
       "0                                 中国                                 南山镇   \n",
       "\n",
       "  regeocode.addressComponent.businessAreas  \\\n",
       "0                                     [[]]   \n",
       "\n",
       "  regeocode.addressComponent.building.name  \\\n",
       "0                                       []   \n",
       "\n",
       "  regeocode.addressComponent.building.type  \\\n",
       "0                                       []   \n",
       "\n",
       "  regeocode.addressComponent.neighborhood.name  \\\n",
       "0                                           []   \n",
       "\n",
       "  regeocode.addressComponent.neighborhood.type  \\\n",
       "0                                           []   \n",
       "\n",
       "  regeocode.addressComponent.citycode regeocode.formatted_address  \n",
       "0                                0759            广东省湛江市徐闻县南山镇进港公路  \n",
       "\n",
       "[1 rows x 22 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "def regeocode(location,poitype=None,radius=None,extensions=None,batch=None,roadlevel=None):\n",
    "    url='https://restapi.amap.com/v3/geocode/regeo?parameters'\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'location':location,\n",
    "        'poitype':poitype,\n",
    "        'radius':radius,\n",
    "        'extensions':extensions,\n",
    "        'batch':batch,\n",
    "        'roadlevel':0,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n",
    "徐一逆地理编码 = regeocode(徐一地理编码)\n",
    "print(徐一逆地理编码)\n",
    "df_徐一逆地理编码=json_normalize(徐一逆地理编码)\n",
    "# df_徐一地理位置\n",
    "display(df_徐一逆地理编码)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'roads': [{'id': '0759F49F045018549',\n",
       "    'location': '110.158,20.3265',\n",
       "    'direction': '西',\n",
       "    'name': '进港公路',\n",
       "    'distance': '125.22'},\n",
       "   {'id': '0759F49F045018603776',\n",
       "    'location': '110.159,20.327',\n",
       "    'direction': '西',\n",
       "    'name': '华建三路',\n",
       "    'distance': '265.259'},\n",
       "   {'id': '0759F49F04501826823',\n",
       "    'location': '110.159,20.328',\n",
       "    'direction': '西南',\n",
       "    'name': '文塔路',\n",
       "    'distance': '355.533'}],\n",
       "  'roadinters': [{'second_name': '华建三路',\n",
       "    'first_id': '0759F49F045018549',\n",
       "    'second_id': '0759F49F045018603776',\n",
       "    'location': '110.15892,20.32702694',\n",
       "    'distance': '265.259',\n",
       "    'first_name': '进港公路',\n",
       "    'direction': '西'}],\n",
       "  'formatted_address': '广东省湛江市徐闻县南山镇进港公路',\n",
       "  'addressComponent': {'city': '湛江市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440825',\n",
       "   'district': '徐闻县',\n",
       "   'towncode': '440825113000',\n",
       "   'streetNumber': {'number': '326号',\n",
       "    'location': '110.15896,20.3281681',\n",
       "    'direction': '东北',\n",
       "    'distance': '334.087',\n",
       "    'street': '进港公路'},\n",
       "   'country': '中国',\n",
       "   'township': '南山镇',\n",
       "   'businessAreas': [[]],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '0759'},\n",
       "  'aois': [],\n",
       "  'pois': [{'id': 'B02F701BSC',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '工农路与文塔路交叉口东南150米',\n",
       "    'poiweight': '0.231803',\n",
       "    'name': '中国信合(加乐分社)',\n",
       "    'location': '110.158178,20.327456',\n",
       "    'distance': '220.757',\n",
       "    'tel': [],\n",
       "    'type': '金融保险服务;银行;农村商业银行'},\n",
       "   {'id': 'B02F7026K9',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '工农路与文塔路交叉口南100米',\n",
       "    'poiweight': '0.110428',\n",
       "    'name': '徐闻城西新桥小区',\n",
       "    'location': '110.157160,20.327620',\n",
       "    'distance': '169.998',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;住宅小区'},\n",
       "   {'id': 'B02F701RAX',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '三六七省道',\n",
       "    'poiweight': '0.206268',\n",
       "    'name': '徐闻县海丰医院',\n",
       "    'location': '110.158699,20.327508',\n",
       "    'distance': '268.298',\n",
       "    'tel': [],\n",
       "    'type': '医疗保健服务;综合医院;综合医院'},\n",
       "   {'id': 'B02F701S3O',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '三六七省道',\n",
       "    'poiweight': '0.20368',\n",
       "    'name': '徐闻县慢性病防治站',\n",
       "    'location': '110.158645,20.327994',\n",
       "    'distance': '296.629',\n",
       "    'tel': [],\n",
       "    'type': '医疗保健服务;疾病预防机构;疾病预防'},\n",
       "   {'id': 'B0FFGJ87V9',\n",
       "    'direction': '西北',\n",
       "    'businessarea': [],\n",
       "    'address': [],\n",
       "    'poiweight': '0.0971956',\n",
       "    'name': '徐城环卫站',\n",
       "    'location': '110.155788,20.327147',\n",
       "    'distance': '129.772',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;政府机关相关'},\n",
       "   {'id': 'B02F701S5K',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '华建路59号(怡福家园东北)',\n",
       "    'poiweight': '0.13672',\n",
       "    'name': '城西快乐幼儿园',\n",
       "    'location': '110.159756,20.326137',\n",
       "    'distance': '336.503',\n",
       "    'tel': '13922079469',\n",
       "    'type': '科教文化服务;学校;幼儿园'},\n",
       "   {'id': 'B0FFGAL6N0',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '文塔路徐闻城西新桥小区西北250米',\n",
       "    'poiweight': '0.186406',\n",
       "    'name': '步步高家私城',\n",
       "    'location': '110.155633,20.328972',\n",
       "    'distance': '321.053',\n",
       "    'tel': [],\n",
       "    'type': '购物服务;家居建材市场;家具城'},\n",
       "   {'id': 'B0FFG7A5S3',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '文塔路(徐闻县海丰医院东)',\n",
       "    'poiweight': '0.177483',\n",
       "    'name': '邬王庙',\n",
       "    'location': '110.159862,20.327488',\n",
       "    'distance': '375.382',\n",
       "    'tel': [],\n",
       "    'type': '风景名胜;风景名胜;寺庙道观'},\n",
       "   {'id': 'B0FFIHLY7I',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '进港超市东南70米(文塔路)',\n",
       "    'poiweight': '0.163701',\n",
       "    'name': '柏浮春饭店',\n",
       "    'location': '110.157788,20.328448',\n",
       "    'distance': '281.329',\n",
       "    'tel': '13420118241',\n",
       "    'type': '餐饮服务;中餐厅;中餐厅'},\n",
       "   {'id': 'B0FFG61N2R',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '工农路与文塔路交叉口西北100米',\n",
       "    'poiweight': '0.126822',\n",
       "    'name': '车友汽车维修中心',\n",
       "    'location': '110.156679,20.328518',\n",
       "    'distance': '257.125',\n",
       "    'tel': '18933809200',\n",
       "    'type': '汽车维修;汽车维修;汽车维修'},\n",
       "   {'id': 'B0FFFO4F1C',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '文塔西路中段',\n",
       "    'poiweight': '0.0647465',\n",
       "    'name': '金桥住宿',\n",
       "    'location': '110.160220,20.327791',\n",
       "    'distance': '423.042',\n",
       "    'tel': '0759-4901889',\n",
       "    'type': '住宿服务;宾馆酒店;宾馆酒店|住宿服务;旅馆招待所;旅馆招待所'},\n",
       "   {'id': 'B0FFF9KQUE',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '文塔路与贵生路交汇处以西280米',\n",
       "    'poiweight': '0.461267',\n",
       "    'name': '登云住宿',\n",
       "    'location': '110.159531,20.327837',\n",
       "    'distance': '361.473',\n",
       "    'tel': '0759-4895845;18802579768',\n",
       "    'type': '住宿服务;旅馆招待所;旅馆招待所'},\n",
       "   {'id': 'B02F701LC5',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '徐闻县',\n",
       "    'poiweight': '0.217678',\n",
       "    'name': '粽铺村',\n",
       "    'location': '110.159348,20.328873',\n",
       "    'distance': '417.185',\n",
       "    'tel': [],\n",
       "    'type': '地名地址信息;普通地名;村庄级地名'},\n",
       "   {'id': 'B0FFG5CVSJ',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '城南中学直上200米',\n",
       "    'poiweight': '0.191856',\n",
       "    'name': '启晨艺术幼儿园',\n",
       "    'location': '110.160205,20.325106',\n",
       "    'distance': '402.394',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;幼儿园'},\n",
       "   {'id': 'B0FFGAFK5W',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '文塔路302号',\n",
       "    'poiweight': '0.225389',\n",
       "    'name': '广源楼',\n",
       "    'location': '110.160147,20.328129',\n",
       "    'distance': '433.334',\n",
       "    'tel': '15014416543',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关'},\n",
       "   {'id': 'B02F7026EB',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '华建路与贵生路交叉口西南50米',\n",
       "    'poiweight': '0.114641',\n",
       "    'name': '徐闻县治安巡逻大队第二中队',\n",
       "    'location': '110.161638,20.325520',\n",
       "    'distance': '538.145',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;交通车辆管理;交通管理机构'},\n",
       "   {'id': 'B02F7004FE',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '徐城工农路61号',\n",
       "    'poiweight': '0.374486',\n",
       "    'name': '徐闻县第五中学',\n",
       "    'location': '110.161109,20.322779',\n",
       "    'distance': '611.189',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;中学'},\n",
       "   {'id': 'B02F701S3P',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '木棉路89号',\n",
       "    'poiweight': '0.160513',\n",
       "    'name': '中国信合(徐闻县城西分社)',\n",
       "    'location': '110.162454,20.322999',\n",
       "    'distance': '713.502',\n",
       "    'tel': [],\n",
       "    'type': '金融保险服务;银行;农村商业银行'},\n",
       "   {'id': 'B0FFG5CVRJ',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '工农路与贵生路交叉口西北200米',\n",
       "    'poiweight': '0.152625',\n",
       "    'name': '华书进口红木加工厂',\n",
       "    'location': '110.160985,20.324094',\n",
       "    'distance': '520.749',\n",
       "    'tel': '13692330018;13005604358',\n",
       "    'type': '购物服务;家居建材市场;家具城'},\n",
       "   {'id': 'B02F7023OD',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '木棉路',\n",
       "    'poiweight': '0.303508',\n",
       "    'name': '徐闻县城南幼儿园',\n",
       "    'location': '110.162170,20.322869',\n",
       "    'distance': '695.645',\n",
       "    'tel': '13553521366',\n",
       "    'type': '科教文化服务;学校;幼儿园'},\n",
       "   {'id': 'B0FFG5CVLE',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '市尾路与贵生路交叉口东北50米',\n",
       "    'poiweight': '0.235925',\n",
       "    'name': '徐闻县东平医院',\n",
       "    'location': '110.162907,20.322916',\n",
       "    'distance': '759.172',\n",
       "    'tel': [],\n",
       "    'type': '医疗保健服务;综合医院;综合医院'},\n",
       "   {'id': 'B02F701R8F',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '贵生路',\n",
       "    'poiweight': '0.223543',\n",
       "    'name': '贵生中学',\n",
       "    'location': '110.160439,20.331924',\n",
       "    'distance': '754.882',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;中学'},\n",
       "   {'id': 'B02F701S3M',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '工农路徐闻第五中学附近',\n",
       "    'poiweight': '0.129493',\n",
       "    'name': '小太阳育才园',\n",
       "    'location': '110.162130,20.322851',\n",
       "    'distance': '693.185',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;幼儿园'},\n",
       "   {'id': 'B02F701S1G',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '华建路与贵生路交叉口东200米',\n",
       "    'poiweight': '0.222939',\n",
       "    'name': '妇儿中心幼儿园',\n",
       "    'location': '110.163544,20.325265',\n",
       "    'distance': '738.89',\n",
       "    'tel': '0759-4894880',\n",
       "    'type': '科教文化服务;学校;幼儿园'},\n",
       "   {'id': 'B02F700TGS',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '华建路与贵生路交叉口东北150米',\n",
       "    'poiweight': '0.159004',\n",
       "    'name': '徐闻教师村',\n",
       "    'location': '110.163,20.326467',\n",
       "    'distance': '675.267',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;住宅小区'},\n",
       "   {'id': 'B02F7026E5',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '贵生路贵生公园旁边',\n",
       "    'poiweight': '0.362631',\n",
       "    'name': '西门村委会',\n",
       "    'location': '110.162437,20.330057',\n",
       "    'distance': '749.921',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;乡镇以下级政府及事业单位'},\n",
       "   {'id': 'B0FFF9YYK7',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '徐城街道贵生路(与文塔路交叉北30米)',\n",
       "    'poiweight': '0.185736',\n",
       "    'name': '中森卫浴',\n",
       "    'location': '110.162168,20.328269',\n",
       "    'distance': '630.914',\n",
       "    'tel': '13670976277',\n",
       "    'type': '购物服务;家居建材市场;家居建材市场'},\n",
       "   {'id': 'B0FFGAJ24A',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '文塔路与贵生路交叉口西100米',\n",
       "    'poiweight': '0.141009',\n",
       "    'name': '宝成SUS304不锈钢(徐闻宏平总经销)',\n",
       "    'location': '110.161300,20.327844',\n",
       "    'distance': '529.537',\n",
       "    'tel': '0759-4858816;13729114180',\n",
       "    'type': '购物服务;家居建材市场;建材五金市场'},\n",
       "   {'id': 'B0FFKATO55',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '工农路南50米',\n",
       "    'poiweight': '0.159688',\n",
       "    'name': '鸿运小区',\n",
       "    'location': '110.159413,20.331200',\n",
       "    'distance': '631.092',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;住宅小区'},\n",
       "   {'id': 'B02F70O545',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '徐城街道贵生路城南中学东北200米',\n",
       "    'poiweight': '0.171788',\n",
       "    'name': '康众药店(贵生路店)',\n",
       "    'location': '110.161922,20.324622',\n",
       "    'distance': '589.331',\n",
       "    'tel': [],\n",
       "    'type': '医疗保健服务;医药保健销售店;药房'}]},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# extensions 参数取值为 all 时会返回基本地址信息、附近 POI 内容、道路信息以及道路交叉口信息。\n",
    "徐一逆地理编码_all = regeocode(徐一地理编码,extensions=\"all\")\n",
    "徐一逆地理编码_all\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>location</th>\n",
       "      <th>direction</th>\n",
       "      <th>name</th>\n",
       "      <th>distance</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0759F49F045018549</td>\n",
       "      <td>110.158,20.3265</td>\n",
       "      <td>西</td>\n",
       "      <td>进港公路</td>\n",
       "      <td>125.22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0759F49F045018603776</td>\n",
       "      <td>110.159,20.327</td>\n",
       "      <td>西</td>\n",
       "      <td>华建三路</td>\n",
       "      <td>265.259</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0759F49F04501826823</td>\n",
       "      <td>110.159,20.328</td>\n",
       "      <td>西南</td>\n",
       "      <td>文塔路</td>\n",
       "      <td>355.533</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                     id         location direction  name distance\n",
       "0     0759F49F045018549  110.158,20.3265         西  进港公路   125.22\n",
       "1  0759F49F045018603776   110.159,20.327         西  华建三路  265.259\n",
       "2   0759F49F04501826823   110.159,20.328        西南   文塔路  355.533"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_徐一逆地理编码_all = json_normalize(徐一逆地理编码_all['regeocode']['roads'])\n",
    "df_徐一逆地理编码_all"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>roads</th>\n",
       "      <th>roadinters</th>\n",
       "      <th>formatted_address</th>\n",
       "      <th>aois</th>\n",
       "      <th>pois</th>\n",
       "      <th>addressComponent.city</th>\n",
       "      <th>addressComponent.province</th>\n",
       "      <th>addressComponent.adcode</th>\n",
       "      <th>addressComponent.district</th>\n",
       "      <th>addressComponent.towncode</th>\n",
       "      <th>...</th>\n",
       "      <th>addressComponent.streetNumber.distance</th>\n",
       "      <th>addressComponent.streetNumber.street</th>\n",
       "      <th>addressComponent.country</th>\n",
       "      <th>addressComponent.township</th>\n",
       "      <th>addressComponent.businessAreas</th>\n",
       "      <th>addressComponent.building.name</th>\n",
       "      <th>addressComponent.building.type</th>\n",
       "      <th>addressComponent.neighborhood.name</th>\n",
       "      <th>addressComponent.neighborhood.type</th>\n",
       "      <th>addressComponent.citycode</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>[{'id': '0759F49F045018549', 'location': '110....</td>\n",
       "      <td>[{'second_name': '华建三路', 'first_id': '0759F49F...</td>\n",
       "      <td>广东省湛江市徐闻县南山镇进港公路</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': 'B02F701BSC', 'direction': '东北', 'busi...</td>\n",
       "      <td>湛江市</td>\n",
       "      <td>广东省</td>\n",
       "      <td>440825</td>\n",
       "      <td>徐闻县</td>\n",
       "      <td>440825113000</td>\n",
       "      <td>...</td>\n",
       "      <td>334.087</td>\n",
       "      <td>进港公路</td>\n",
       "      <td>中国</td>\n",
       "      <td>南山镇</td>\n",
       "      <td>[[]]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0759</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1 rows × 23 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                               roads  \\\n",
       "0  [{'id': '0759F49F045018549', 'location': '110....   \n",
       "\n",
       "                                          roadinters formatted_address aois  \\\n",
       "0  [{'second_name': '华建三路', 'first_id': '0759F49F...  广东省湛江市徐闻县南山镇进港公路   []   \n",
       "\n",
       "                                                pois addressComponent.city  \\\n",
       "0  [{'id': 'B02F701BSC', 'direction': '东北', 'busi...                   湛江市   \n",
       "\n",
       "  addressComponent.province addressComponent.adcode addressComponent.district  \\\n",
       "0                       广东省                  440825                       徐闻县   \n",
       "\n",
       "  addressComponent.towncode  ... addressComponent.streetNumber.distance  \\\n",
       "0              440825113000  ...                                334.087   \n",
       "\n",
       "  addressComponent.streetNumber.street addressComponent.country  \\\n",
       "0                                 进港公路                       中国   \n",
       "\n",
       "  addressComponent.township addressComponent.businessAreas  \\\n",
       "0                       南山镇                           [[]]   \n",
       "\n",
       "  addressComponent.building.name addressComponent.building.type  \\\n",
       "0                             []                             []   \n",
       "\n",
       "  addressComponent.neighborhood.name addressComponent.neighborhood.type  \\\n",
       "0                                 []                                 []   \n",
       "\n",
       "  addressComponent.citycode  \n",
       "0                      0759  \n",
       "\n",
       "[1 rows x 23 columns]"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_徐一逆地理编码_all = json_normalize(徐一逆地理编码_all['regeocode'])\n",
    "df_徐一逆地理编码_all"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.2路径规划：\n",
    "### 以HTTP形式提供的步行、公交、驾车查询及行驶距离计算接口"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.2.0步行路径规划"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "def walking(origin,destination,sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/direction/walking?parameters'\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'origin':origin,\n",
    "        'destination':destination,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(起点)徐一_location: 110.156530,20.326210 (终点)徐中_location: 110.191993,20.334068\n"
     ]
    }
   ],
   "source": [
    "# 获取起点和终点的地理坐标\n",
    "徐中 = geocode('广东省湛江市徐闻县徐闻中学')\n",
    "徐中_location = 徐中['geocodes'][0]['location']\n",
    "徐一_location = 徐一['geocodes'][0]['location']\n",
    "print(\"(起点)徐一_location:\",徐一_location,\"(终点)徐中_location:\",徐中_location)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'ok',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'route': {'origin': '110.156530,20.326210',\n",
       "  'destination': '110.191993,20.334068',\n",
       "  'paths': [{'distance': '4045',\n",
       "    'duration': '3236',\n",
       "    'steps': [{'instruction': '向北步行250米右转',\n",
       "      'orientation': '北',\n",
       "      'road': [],\n",
       "      'distance': '250',\n",
       "      'duration': '200',\n",
       "      'polyline': '110.156519,20.326189;110.156497,20.326202;110.15648,20.326263;110.156675,20.327461;110.156675,20.327461;110.156719,20.327635;110.156758,20.327925;110.156849,20.328342;110.156849,20.328342;110.156866,20.328394',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿进港公路向东步行265米直行',\n",
       "      'orientation': '东',\n",
       "      'road': '进港公路',\n",
       "      'distance': '265',\n",
       "      'duration': '212',\n",
       "      'polyline': '110.156866,20.328394;110.157101,20.328303;110.157101,20.328303;110.157331,20.328273;110.157331,20.328273;110.157743,20.328255;110.158546,20.328147;110.158546,20.328147;110.159375,20.328043',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿文塔路向东步行907米左转',\n",
       "      'orientation': '东',\n",
       "      'road': '文塔路',\n",
       "      'distance': '907',\n",
       "      'duration': '726',\n",
       "      'polyline': '110.159375,20.328038;110.159865,20.327969;110.159865,20.327969;110.16043,20.327891;110.16043,20.327891;110.16214,20.327648;110.16214,20.327648;110.162201,20.327639;110.162201,20.327639;110.163924,20.327374;110.163924,20.327374;110.165412,20.327192;110.165634,20.327188;110.165634,20.327188;110.166806,20.327292;110.166806,20.327292;110.167088,20.327318;110.167088,20.327318;110.16803,20.3274',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿文塔路向东步行67米右转',\n",
       "      'orientation': '东',\n",
       "      'road': '文塔路',\n",
       "      'distance': '67',\n",
       "      'duration': '54',\n",
       "      'polyline': '110.16803,20.3274;110.168051,20.327478;110.168103,20.32753;110.168164,20.327574;110.168251,20.327604;110.168364,20.327613;110.168446,20.327609;110.168555,20.327561',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿民主路向南步行12米左转',\n",
       "      'orientation': '南',\n",
       "      'road': '民主路',\n",
       "      'distance': '12',\n",
       "      'duration': '10',\n",
       "      'polyline': '110.168555,20.327556;110.168568,20.327457',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿东方一路向东步行671米向左前方行走',\n",
       "      'orientation': '东',\n",
       "      'road': '东方一路',\n",
       "      'distance': '671',\n",
       "      'duration': '537',\n",
       "      'polyline': '110.168568,20.327452;110.170903,20.327986;110.170903,20.327986;110.171936,20.328255;110.171936,20.328255;110.172522,20.328416;110.172522,20.328416;110.172743,20.328468;110.172743,20.328468;110.173095,20.328555;110.173095,20.328555;110.173481,20.328655;110.173481,20.328655;110.174145,20.328824;110.174145,20.328824;110.174362,20.328872;110.174362,20.328872;110.174757,20.328971;110.174757,20.328971;110.174809,20.329019',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿东方二路向东步行821米直行',\n",
       "      'orientation': '东',\n",
       "      'road': '东方二路',\n",
       "      'distance': '821',\n",
       "      'duration': '657',\n",
       "      'polyline': '110.174809,20.329019;110.176176,20.329353;110.176176,20.329353;110.17674,20.329492;110.17674,20.329492;110.177083,20.329575;110.177083,20.329575;110.177808,20.329757;110.177808,20.329757;110.17826,20.32987;110.17826,20.32987;110.179249,20.330126;110.179249,20.330126;110.179748,20.330247;110.179748,20.330247;110.179939,20.330295;110.179939,20.330295;110.180273,20.330391;110.180273,20.330391;110.180881,20.330612;110.180881,20.330612;110.181615,20.330885;110.181615,20.330885;110.181875,20.330981;110.181875,20.330981;110.181997,20.33105;110.181997,20.33105;110.182287,20.331176;110.182287,20.331176;110.182361,20.331211',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿东方四路向东北步行63米直行',\n",
       "      'orientation': '东北',\n",
       "      'road': '东方四路',\n",
       "      'distance': '63',\n",
       "      'duration': '50',\n",
       "      'polyline': '110.182361,20.331211;110.18293,20.331445',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿东方二路向东步行715米直行',\n",
       "      'orientation': '东',\n",
       "      'road': '东方二路',\n",
       "      'distance': '715',\n",
       "      'duration': '572',\n",
       "      'polyline': '110.18293,20.331445;110.183355,20.331623;110.183355,20.331623;110.183728,20.331775;110.183728,20.331775;110.184553,20.332114;110.184553,20.332114;110.186011,20.332708;110.186011,20.332708;110.186267,20.332817;110.186267,20.332817;110.187049,20.333134;110.187049,20.333134;110.187687,20.33339;110.188199,20.333524;110.188611,20.333589;110.189353,20.333663',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿376省道向东步行274米到达目的地',\n",
       "      'orientation': '东',\n",
       "      'road': '376省道',\n",
       "      'distance': '274',\n",
       "      'duration': '219',\n",
       "      'polyline': '110.189353,20.333663;110.189991,20.333715;110.189991,20.333715;110.191068,20.333802;110.191068,20.333802;110.191975,20.333893',\n",
       "      'action': [],\n",
       "      'assistant_action': '到达目的地',\n",
       "      'walk_type': '0'}]}]}}"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 实现路径规划\n",
    "徐一_徐中=walking(origin=徐一_location,destination=徐中_location)\n",
    "徐一_徐中"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>instruction</th>\n",
       "      <th>orientation</th>\n",
       "      <th>road</th>\n",
       "      <th>distance</th>\n",
       "      <th>duration</th>\n",
       "      <th>polyline</th>\n",
       "      <th>action</th>\n",
       "      <th>assistant_action</th>\n",
       "      <th>walk_type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>向北步行250米右转</td>\n",
       "      <td>北</td>\n",
       "      <td>[]</td>\n",
       "      <td>250</td>\n",
       "      <td>200</td>\n",
       "      <td>110.156519,20.326189;110.156497,20.326202;110....</td>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>沿进港公路向东步行265米直行</td>\n",
       "      <td>东</td>\n",
       "      <td>进港公路</td>\n",
       "      <td>265</td>\n",
       "      <td>212</td>\n",
       "      <td>110.156866,20.328394;110.157101,20.328303;110....</td>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>沿文塔路向东步行907米左转</td>\n",
       "      <td>东</td>\n",
       "      <td>文塔路</td>\n",
       "      <td>907</td>\n",
       "      <td>726</td>\n",
       "      <td>110.159375,20.328038;110.159865,20.327969;110....</td>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>沿文塔路向东步行67米右转</td>\n",
       "      <td>东</td>\n",
       "      <td>文塔路</td>\n",
       "      <td>67</td>\n",
       "      <td>54</td>\n",
       "      <td>110.16803,20.3274;110.168051,20.327478;110.168...</td>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>沿民主路向南步行12米左转</td>\n",
       "      <td>南</td>\n",
       "      <td>民主路</td>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>110.168555,20.327556;110.168568,20.327457</td>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>沿东方一路向东步行671米向左前方行走</td>\n",
       "      <td>东</td>\n",
       "      <td>东方一路</td>\n",
       "      <td>671</td>\n",
       "      <td>537</td>\n",
       "      <td>110.168568,20.327452;110.170903,20.327986;110....</td>\n",
       "      <td>向左前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>沿东方二路向东步行821米直行</td>\n",
       "      <td>东</td>\n",
       "      <td>东方二路</td>\n",
       "      <td>821</td>\n",
       "      <td>657</td>\n",
       "      <td>110.174809,20.329019;110.176176,20.329353;110....</td>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>沿东方四路向东北步行63米直行</td>\n",
       "      <td>东北</td>\n",
       "      <td>东方四路</td>\n",
       "      <td>63</td>\n",
       "      <td>50</td>\n",
       "      <td>110.182361,20.331211;110.18293,20.331445</td>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>沿东方二路向东步行715米直行</td>\n",
       "      <td>东</td>\n",
       "      <td>东方二路</td>\n",
       "      <td>715</td>\n",
       "      <td>572</td>\n",
       "      <td>110.18293,20.331445;110.183355,20.331623;110.1...</td>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>沿376省道向东步行274米到达目的地</td>\n",
       "      <td>东</td>\n",
       "      <td>376省道</td>\n",
       "      <td>274</td>\n",
       "      <td>219</td>\n",
       "      <td>110.189353,20.333663;110.189991,20.333715;110....</td>\n",
       "      <td>[]</td>\n",
       "      <td>到达目的地</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           instruction orientation   road distance duration  \\\n",
       "0           向北步行250米右转           北     []      250      200   \n",
       "1      沿进港公路向东步行265米直行           东   进港公路      265      212   \n",
       "2       沿文塔路向东步行907米左转           东    文塔路      907      726   \n",
       "3        沿文塔路向东步行67米右转           东    文塔路       67       54   \n",
       "4        沿民主路向南步行12米左转           南    民主路       12       10   \n",
       "5  沿东方一路向东步行671米向左前方行走           东   东方一路      671      537   \n",
       "6      沿东方二路向东步行821米直行           东   东方二路      821      657   \n",
       "7      沿东方四路向东北步行63米直行          东北   东方四路       63       50   \n",
       "8      沿东方二路向东步行715米直行           东   东方二路      715      572   \n",
       "9  沿376省道向东步行274米到达目的地           东  376省道      274      219   \n",
       "\n",
       "                                            polyline  action assistant_action  \\\n",
       "0  110.156519,20.326189;110.156497,20.326202;110....      右转               []   \n",
       "1  110.156866,20.328394;110.157101,20.328303;110....      直行               []   \n",
       "2  110.159375,20.328038;110.159865,20.327969;110....      左转               []   \n",
       "3  110.16803,20.3274;110.168051,20.327478;110.168...      右转               []   \n",
       "4          110.168555,20.327556;110.168568,20.327457      左转               []   \n",
       "5  110.168568,20.327452;110.170903,20.327986;110....  向左前方行走               []   \n",
       "6  110.174809,20.329019;110.176176,20.329353;110....      直行               []   \n",
       "7           110.182361,20.331211;110.18293,20.331445      直行               []   \n",
       "8  110.18293,20.331445;110.183355,20.331623;110.1...      直行               []   \n",
       "9  110.189353,20.333663;110.189991,20.333715;110....      []            到达目的地   \n",
       "\n",
       "  walk_type  \n",
       "0         0  \n",
       "1         0  \n",
       "2         0  \n",
       "3         0  \n",
       "4         0  \n",
       "5         0  \n",
       "6         0  \n",
       "7         0  \n",
       "8         0  \n",
       "9         0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "0             向北步行250米右转\n",
       "1        沿进港公路向东步行265米直行\n",
       "2         沿文塔路向东步行907米左转\n",
       "3          沿文塔路向东步行67米右转\n",
       "4          沿民主路向南步行12米左转\n",
       "5    沿东方一路向东步行671米向左前方行走\n",
       "6        沿东方二路向东步行821米直行\n",
       "7        沿东方四路向东北步行63米直行\n",
       "8        沿东方二路向东步行715米直行\n",
       "9    沿376省道向东步行274米到达目的地\n",
       "Name: instruction, dtype: object"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 整理路径规划\n",
    "df_徐一_徐中=json_normalize(徐一_徐中['route']['paths'][0]['steps'])\n",
    "display(df_徐一_徐中)\n",
    "df_徐一_徐中[\"instruction\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.2.1公交路线\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "def integrated(origin,destination,city,cityd=None,extensions='base',strategy=None,nightflag=0,date=None,time=None,sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/direction/transit/integrated?parameters'\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'origin':origin,\n",
    "        'destination':destination,\n",
    "        'city':city,\n",
    "        'cityd':cityd,\n",
    "        'extensions':extensions,\n",
    "        'strategy':strategy,\n",
    "        'nightflag':nightflag,\n",
    "        'date':date,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'departure_stop': {'name': '鸿源食庄站',\n",
       "   'id': '900000070624007',\n",
       "   'location': '110.164131,20.327291'},\n",
       "  'arrival_stop': {'name': '徐闻中学站',\n",
       "   'id': '900000070624020',\n",
       "   'location': '110.191910,20.333801'},\n",
       "  'name': '徐闻15线(新国线中心客运站--龙屯村北站(那屯站))',\n",
       "  'id': '900000070624',\n",
       "  'type': '普通公交线路',\n",
       "  'distance': '2957',\n",
       "  'duration': '1539',\n",
       "  'polyline': '110.164131,20.327291;110.164391,20.327257;110.165207,20.327158;110.165413,20.327135;110.165619,20.327127;110.167099,20.327261;110.168015,20.327343;110.168030,20.327318;110.168076,20.327271;110.168152,20.327217;110.168175,20.327206;110.168205,20.327200;110.168205,20.327196;110.168243,20.327192;110.168282,20.327183;110.168434,20.327192;110.168533,20.327213;110.168587,20.327253;110.168571,20.327448;110.168907,20.327526;110.170692,20.327938;110.170914,20.327990;110.171577,20.328156;110.172516,20.328415;110.172745,20.328463;110.172951,20.328516;110.173744,20.328720;110.174355,20.328876;110.174759,20.328972;110.174828,20.328949;110.175865,20.329210;110.175865,20.329206;110.176186,20.329288;110.176765,20.329432;110.177834,20.329697;110.178276,20.329809;110.178627,20.329895;110.179253,20.330051;110.179306,20.330065;110.179428,20.330095;110.180237,20.330309;110.180504,20.330391;110.180939,20.330555;110.181717,20.330868;110.181717,20.330864;110.181908,20.330942;110.182144,20.331055;110.182327,20.331133;110.182396,20.331163;110.182724,20.331293;110.182724,20.331289;110.182800,20.331324;110.183746,20.331715;110.185921,20.332603;110.185921,20.332600;110.186050,20.332657;110.187065,20.333073;110.187202,20.333134;110.187622,20.333294;110.187805,20.333359;110.187859,20.333382;110.188087,20.333447;110.188385,20.333508;110.188972,20.333572;110.189354,20.333603;110.189995,20.333654;110.191071,20.333746;110.191910,20.333801',\n",
       "  'bustimetag': '0',\n",
       "  'start_time': '0600',\n",
       "  'end_time': '2240',\n",
       "  'via_num': '12',\n",
       "  'via_stops': [{'name': '康福乐药房站(招呼站)',\n",
       "    'id': '900000070624008',\n",
       "    'location': '110.168205,20.327200'},\n",
       "   {'name': '招呼站',\n",
       "    'id': '900000070624009',\n",
       "    'location': '110.168907,20.327526'},\n",
       "   {'name': '登云塔站',\n",
       "    'id': '900000070624010',\n",
       "    'location': '110.170692,20.327938'},\n",
       "   {'name': '县财政局站',\n",
       "    'id': '900000070624011',\n",
       "    'location': '110.172951,20.328516'},\n",
       "   {'name': '招呼站',\n",
       "    'id': '900000070624012',\n",
       "    'location': '110.173744,20.328720'},\n",
       "   {'name': '文化广场东站',\n",
       "    'id': '900000070624013',\n",
       "    'location': '110.175865,20.329210'},\n",
       "   {'name': '东方市场站',\n",
       "    'id': '900000070624014',\n",
       "    'location': '110.178627,20.329895'},\n",
       "   {'name': '招呼站',\n",
       "    'id': '900000070624015',\n",
       "    'location': '110.179428,20.330095'},\n",
       "   {'name': '县农机局站',\n",
       "    'id': '900000070624016',\n",
       "    'location': '110.181717,20.330868'},\n",
       "   {'name': '招呼站',\n",
       "    'id': '900000070624017',\n",
       "    'location': '110.182724,20.331293'},\n",
       "   {'name': '人民公园站',\n",
       "    'id': '900000070624018',\n",
       "    'location': '110.185921,20.332603'},\n",
       "   {'name': '招呼站',\n",
       "    'id': '900000070624019',\n",
       "    'location': '110.187805,20.333359'}]}]"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "徐一_徐中_bus=integrated(徐一_location,徐中_location,city='湛江',extensions='all')\n",
    "df_buslines=徐一_徐中_bus['route']['transits'][0]['segments'][0]['bus']['buslines']\n",
    "df_buslines"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>徐闻15线(新国线中心客运站--龙屯村北站(那屯站))</th>\n",
       "      <th>id</th>\n",
       "      <th>location</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>康福乐药房站(招呼站)</td>\n",
       "      <td>900000070624008</td>\n",
       "      <td>110.168205,20.327200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>招呼站</td>\n",
       "      <td>900000070624009</td>\n",
       "      <td>110.168907,20.327526</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>登云塔站</td>\n",
       "      <td>900000070624010</td>\n",
       "      <td>110.170692,20.327938</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>县财政局站</td>\n",
       "      <td>900000070624011</td>\n",
       "      <td>110.172951,20.328516</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>招呼站</td>\n",
       "      <td>900000070624012</td>\n",
       "      <td>110.173744,20.328720</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>文化广场东站</td>\n",
       "      <td>900000070624013</td>\n",
       "      <td>110.175865,20.329210</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>东方市场站</td>\n",
       "      <td>900000070624014</td>\n",
       "      <td>110.178627,20.329895</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>招呼站</td>\n",
       "      <td>900000070624015</td>\n",
       "      <td>110.179428,20.330095</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>县农机局站</td>\n",
       "      <td>900000070624016</td>\n",
       "      <td>110.181717,20.330868</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>招呼站</td>\n",
       "      <td>900000070624017</td>\n",
       "      <td>110.182724,20.331293</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>人民公园站</td>\n",
       "      <td>900000070624018</td>\n",
       "      <td>110.185921,20.332603</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>招呼站</td>\n",
       "      <td>900000070624019</td>\n",
       "      <td>110.187805,20.333359</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   徐闻15线(新国线中心客运站--龙屯村北站(那屯站))               id              location\n",
       "0                  康福乐药房站(招呼站)  900000070624008  110.168205,20.327200\n",
       "1                          招呼站  900000070624009  110.168907,20.327526\n",
       "2                         登云塔站  900000070624010  110.170692,20.327938\n",
       "3                        县财政局站  900000070624011  110.172951,20.328516\n",
       "4                          招呼站  900000070624012  110.173744,20.328720\n",
       "5                       文化广场东站  900000070624013  110.175865,20.329210\n",
       "6                        东方市场站  900000070624014  110.178627,20.329895\n",
       "7                          招呼站  900000070624015  110.179428,20.330095\n",
       "8                        县农机局站  900000070624016  110.181717,20.330868\n",
       "9                          招呼站  900000070624017  110.182724,20.331293\n",
       "10                       人民公园站  900000070624018  110.185921,20.332603\n",
       "11                         招呼站  900000070624019  110.187805,20.333359"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_bus = pd.json_normalize(徐一_徐中_bus['route']['transits'][0]['segments'][0]['bus']['buslines'][0]['via_stops']).rename(columns={\"name\":\"徐闻15线(新国线中心客运站--龙屯村北站(那屯站))\"})\n",
    "df_bus"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.3行政区域查询:\n",
    "### 根据用户输入的搜索条件可以帮助用户快速的查找特定的行政区域信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "def district(keywords,subdistrict=None,page=None,extensions=None,filter=None):\n",
    "    url='https://restapi.amap.com/v3/config/district?parameters'\n",
    "    params={\n",
    "            'key':key_wenpur,\n",
    "            'keywords':keywords,\n",
    "            'subdistrict':subdistrict,\n",
    "            'page':page,\n",
    "            'extensions':extensions,\n",
    "            'filter':filter,\n",
    "            'output':'json'\n",
    "        }\n",
    "    response = requests.get(url,params=params)\n",
    "    \n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>citycode</th>\n",
       "      <th>adcode</th>\n",
       "      <th>name</th>\n",
       "      <th>center</th>\n",
       "      <th>level</th>\n",
       "      <th>districts</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>从化区</td>\n",
       "      <td>113.587386,23.545283</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440117', 'name...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>020</td>\n",
       "      <td>440115</td>\n",
       "      <td>南沙区</td>\n",
       "      <td>113.53738,22.794531</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440115', 'name...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>020</td>\n",
       "      <td>440114</td>\n",
       "      <td>花都区</td>\n",
       "      <td>113.211184,23.39205</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440114', 'name...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>番禺区</td>\n",
       "      <td>113.364619,22.938582</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440113', 'name...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>020</td>\n",
       "      <td>440103</td>\n",
       "      <td>荔湾区</td>\n",
       "      <td>113.243038,23.124943</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440103', 'name...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>020</td>\n",
       "      <td>440105</td>\n",
       "      <td>海珠区</td>\n",
       "      <td>113.262008,23.103131</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440105', 'name...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>020</td>\n",
       "      <td>440111</td>\n",
       "      <td>白云区</td>\n",
       "      <td>113.262831,23.162281</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440111', 'name...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>020</td>\n",
       "      <td>440118</td>\n",
       "      <td>增城区</td>\n",
       "      <td>113.829579,23.290497</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440118', 'name...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>020</td>\n",
       "      <td>440112</td>\n",
       "      <td>黄埔区</td>\n",
       "      <td>113.450761,23.103239</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440112', 'name...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>020</td>\n",
       "      <td>440106</td>\n",
       "      <td>天河区</td>\n",
       "      <td>113.335367,23.13559</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440106', 'name...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>020</td>\n",
       "      <td>440104</td>\n",
       "      <td>越秀区</td>\n",
       "      <td>113.280714,23.125624</td>\n",
       "      <td>district</td>\n",
       "      <td>[{'citycode': '020', 'adcode': '440104', 'name...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   citycode  adcode name                center     level  \\\n",
       "0       020  440117  从化区  113.587386,23.545283  district   \n",
       "1       020  440115  南沙区   113.53738,22.794531  district   \n",
       "2       020  440114  花都区   113.211184,23.39205  district   \n",
       "3       020  440113  番禺区  113.364619,22.938582  district   \n",
       "4       020  440103  荔湾区  113.243038,23.124943  district   \n",
       "5       020  440105  海珠区  113.262008,23.103131  district   \n",
       "6       020  440111  白云区  113.262831,23.162281  district   \n",
       "7       020  440118  增城区  113.829579,23.290497  district   \n",
       "8       020  440112  黄埔区  113.450761,23.103239  district   \n",
       "9       020  440106  天河区   113.335367,23.13559  district   \n",
       "10      020  440104  越秀区  113.280714,23.125624  district   \n",
       "\n",
       "                                            districts  \n",
       "0   [{'citycode': '020', 'adcode': '440117', 'name...  \n",
       "1   [{'citycode': '020', 'adcode': '440115', 'name...  \n",
       "2   [{'citycode': '020', 'adcode': '440114', 'name...  \n",
       "3   [{'citycode': '020', 'adcode': '440113', 'name...  \n",
       "4   [{'citycode': '020', 'adcode': '440103', 'name...  \n",
       "5   [{'citycode': '020', 'adcode': '440105', 'name...  \n",
       "6   [{'citycode': '020', 'adcode': '440111', 'name...  \n",
       "7   [{'citycode': '020', 'adcode': '440118', 'name...  \n",
       "8   [{'citycode': '020', 'adcode': '440112', 'name...  \n",
       "9   [{'citycode': '020', 'adcode': '440106', 'name...  \n",
       "10  [{'citycode': '020', 'adcode': '440104', 'name...  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>citycode</th>\n",
       "      <th>adcode</th>\n",
       "      <th>name</th>\n",
       "      <th>center</th>\n",
       "      <th>level</th>\n",
       "      <th>districts</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>沙头街道</td>\n",
       "      <td>113.354,22.9411</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>石基镇</td>\n",
       "      <td>113.432,22.9945</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>大龙街道</td>\n",
       "      <td>113.435,22.9604</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>市桥街道</td>\n",
       "      <td>113.367,22.9553</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>沙湾镇</td>\n",
       "      <td>113.349,22.9223</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>新造镇</td>\n",
       "      <td>113.432,23.012</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>石壁街道</td>\n",
       "      <td>113.294,22.9748</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>桥南街道</td>\n",
       "      <td>113.348,22.9224</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>南村镇</td>\n",
       "      <td>113.425,23.0143</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>大石街道</td>\n",
       "      <td>113.323,23.0315</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>洛浦街道</td>\n",
       "      <td>113.304,23.027</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>东环街道</td>\n",
       "      <td>113.367,22.9546</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>钟村街道</td>\n",
       "      <td>113.291,22.974</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>石楼镇</td>\n",
       "      <td>113.46,22.9896</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>化龙镇</td>\n",
       "      <td>113.438,23.0415</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>020</td>\n",
       "      <td>440113</td>\n",
       "      <td>小谷围街道</td>\n",
       "      <td>113.378,23.0617</td>\n",
       "      <td>street</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   citycode  adcode   name           center   level districts\n",
       "0       020  440113   沙头街道  113.354,22.9411  street        []\n",
       "1       020  440113    石基镇  113.432,22.9945  street        []\n",
       "2       020  440113   大龙街道  113.435,22.9604  street        []\n",
       "3       020  440113   市桥街道  113.367,22.9553  street        []\n",
       "4       020  440113    沙湾镇  113.349,22.9223  street        []\n",
       "5       020  440113    新造镇   113.432,23.012  street        []\n",
       "6       020  440113   石壁街道  113.294,22.9748  street        []\n",
       "7       020  440113   桥南街道  113.348,22.9224  street        []\n",
       "8       020  440113    南村镇  113.425,23.0143  street        []\n",
       "9       020  440113   大石街道  113.323,23.0315  street        []\n",
       "10      020  440113   洛浦街道   113.304,23.027  street        []\n",
       "11      020  440113   东环街道  113.367,22.9546  street        []\n",
       "12      020  440113   钟村街道   113.291,22.974  street        []\n",
       "13      020  440113    石楼镇   113.46,22.9896  street        []\n",
       "14      020  440113    化龙镇  113.438,23.0415  street        []\n",
       "15      020  440113  小谷围街道  113.378,23.0617  street        []"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "行政区域 = district(keywords='广州',extensions='all',subdistrict=2)\n",
    "行政区域\n",
    "# 行政区域 = district(keywords='广东',extensions='all',subdistrict=2)\n",
    "\n",
    "df_行政区域_1级 = pd.json_normalize(行政区域[\"districts\"][0]['districts'])\n",
    "\n",
    "df_行政区域_2级_番禺区 = pd.json_normalize(行政区域[\"districts\"][0]['districts'][3]['districts'])\n",
    "display(df_行政区域_1级,df_行政区域_2级_番禺区 )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.4搜索POI：\n",
    "### 提供多种查询POI信息的能力，其中包括关键字搜索、周边搜索、多边形搜索、ID查询四种筛选机制"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.4.0关键字搜索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '803',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'suggestion': {'keywords': [], 'cities': []},\n",
       " 'pois': [{'id': 'B00140D02H',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '东山湖公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '东湖路123号',\n",
       "   'location': '113.292052,23.115193',\n",
       "   'tel': '020-87609086;020-87775672',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413523321',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_58066;911775',\n",
       "   'entr_location': '113.293499,23.117808',\n",
       "   'business_area': '东湖',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-21 16:06:22',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.5', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00140BYJM ',\n",
       "     'name': ' 东山湖公园(北门) ',\n",
       "     'sname': ' 北门 ',\n",
       "     'location': '113.293409,23.117693',\n",
       "     'address': ' 东湖北路30 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991401 '},\n",
       "    {'id': ' B00140TZTB ',\n",
       "     'name': ' 东山湖公园(海印门) ',\n",
       "     'sname': ' 海印门 ',\n",
       "     'location': '113.288911,23.116059',\n",
       "     'address': ' 东湖路123号东山湖公园 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991401 '},\n",
       "    {'id': ' B001402997 ',\n",
       "     'name': ' 东山湖公园(南门) ',\n",
       "     'sname': ' 南门 ',\n",
       "     'location': '113.290215,23.112261',\n",
       "     'address': ' 沿江东路 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '}],\n",
       "   'photos': [{'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/5aa0d552b30e7b2f91200c6c912b78a7'},\n",
       "    {'title': '东山湖公园',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/478e94923b8209d9784db666e6be8328'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/5df0a10610b4bed9f349151683a1c5b4'}]},\n",
       "  {'id': 'B00140BNNF',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '越秀公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '解放北路988号',\n",
       "   'location': '113.265609,23.140149',\n",
       "   'tel': '020-86661950',\n",
       "   'postcode': [],\n",
       "   'website': 'www.yuexiupark-gz.com',\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413526120',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_593485',\n",
       "   'entr_location': '113.261586,23.142027',\n",
       "   'business_area': '解放北',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 04:25:06',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.6', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00140U2CC ',\n",
       "     'name': ' 越秀公园(西门) ',\n",
       "     'sname': ' 西门 ',\n",
       "     'location': '113.261639,23.142029',\n",
       "     'address': ' 解放北路988号越秀公园内 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991401 '},\n",
       "    {'id': ' B00140T13K ',\n",
       "     'name': ' 越秀公园(西南门) ',\n",
       "     'sname': ' 西南门 ',\n",
       "     'location': '113.271850,23.136477',\n",
       "     'address': ' 小北路 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '},\n",
       "    {'id': ' B00140T14N ',\n",
       "     'name': ' 越秀公园(南门) ',\n",
       "     'sname': ' 南门 ',\n",
       "     'location': '113.264228,23.134185',\n",
       "     'address': ' 解放北路988号越秀公园 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '},\n",
       "    {'id': ' B00140T14C ',\n",
       "     'name': ' 越秀公园(东北1门) ',\n",
       "     'sname': ' 东北1门 ',\n",
       "     'location': '113.264172,23.144676',\n",
       "     'address': ' 环市中路988越秀公园 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '},\n",
       "    {'id': ' B00140T14M ',\n",
       "     'name': ' 越秀公园(西南门) ',\n",
       "     'sname': ' 西南门 ',\n",
       "     'location': '113.262507,23.136561',\n",
       "     'address': ' 解放北路988号越秀公园 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '},\n",
       "    {'id': ' B00141SCR8 ',\n",
       "     'name': ' 越秀公园(西南2门) ',\n",
       "     'sname': ' 西南2门 ',\n",
       "     'location': '113.262856,23.139086',\n",
       "     'address': ' 解放北路988号越秀公园 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '}],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/679ed01af08b2b5c0795324cf3703614'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/eab86347c2bec4ec7bfbc0a018153f3e'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/cc11c0b0e39a326632024c2f3f182098'}]},\n",
       "  {'id': 'B00140UFEV',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '人民公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '府前路',\n",
       "   'location': '113.264369,23.127092',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413525100',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_685622',\n",
       "   'entr_location': '113.264116,23.125483',\n",
       "   'business_area': '建设',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 04:25:33',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.8', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00140T17L ',\n",
       "     'name': ' 人民公园(南门) ',\n",
       "     'sname': ' 南门 ',\n",
       "     'location': '113.264309,23.125568',\n",
       "     'address': ' 府前路 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991401 '},\n",
       "    {'id': ' B0FFFD4LNW ',\n",
       "     'name': ' 人民公园(西门) ',\n",
       "     'sname': ' 西门 ',\n",
       "     'location': '113.263451,23.127439',\n",
       "     'address': ' 连新路2号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '}],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a77964dc767571c6e7f0e9208613a23c'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3b2aaceae9aff62e72b7483be7404303'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3a7eb06801ab0fb23efdb837dfdbe95a'}]},\n",
       "  {'id': 'B00140UETI',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '黄花岗公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '先烈中路79号',\n",
       "   'location': '113.295129,23.139673',\n",
       "   'tel': '020-37588321;020-87326069',\n",
       "   'postcode': [],\n",
       "   'website': 'www.72martyrs.com.cn',\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413526321',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_593490',\n",
       "   'entr_location': '113.292989,23.140902',\n",
       "   'business_area': '黄花岗',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-17 15:40:13',\n",
       "   'alias': '广州市黄花岗公园',\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '5.0', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [],\n",
       "   'photos': [{'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/54b83afdef45a9c9c8837d9d7ce6a4ac'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b6599bb3c40b94a30f4b908ec74a646a'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/ba87b65f44f12a3d1142baca0721b621'}]},\n",
       "  {'id': 'B00140U0TF',\n",
       "   'parent': 'B0014014AD',\n",
       "   'childtype': '301',\n",
       "   'name': '广州雕塑公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '下塘西路545号',\n",
       "   'location': '113.27061,23.148845',\n",
       "   'tel': '020-86351663',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413527121',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_595960',\n",
       "   'entr_location': '113.270845,23.155263',\n",
       "   'business_area': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 16:50:24',\n",
       "   'alias': '雕塑公园',\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.6', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00140UD4N ',\n",
       "     'name': ' 广州雕塑公园(东南1门) ',\n",
       "     'sname': ' 东南1门 ',\n",
       "     'location': '113.271712,23.146210',\n",
       "     'address': ' 下塘西路19号之1 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '}],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/28a9e59f4bd77ed4f4cfdfa59a1ce9e1'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/ae08c3dacde0e520c51dbd37f1502689'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3755e02d585d3220527c2f0510dbe0af'}]},\n",
       "  {'id': 'B00140H4G8',\n",
       "   'parent': 'B0014014AD',\n",
       "   'childtype': '301',\n",
       "   'name': '云台花园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '广园中路801号白云山风景名胜区',\n",
       "   'location': '113.29395,23.157315',\n",
       "   'tel': '020-37229187',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440111',\n",
       "   'adname': '白云区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413528321',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_40244',\n",
       "   'entr_location': '113.294572,23.155423',\n",
       "   'business_area': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 03:36:26',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.5', 'cost': '10.00', 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00140UG4C ',\n",
       "     'name': ' 云台花园(东南门) ',\n",
       "     'sname': ' 东南门 ',\n",
       "     'location': '113.294225,23.155531',\n",
       "     'address': ' 广园中路801号云台花园 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '}],\n",
       "   'photos': [{'title': '云台花园',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/ce38d54a2df770212a562c67da365e22'},\n",
       "    {'title': '云台花园',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/29ff9363061eb946c17263c5a55ac305'},\n",
       "    {'title': '云台花园',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/6100e216eeb0685fb6fc6d31b8b0bc2a'}]},\n",
       "  {'id': 'B00140C5YX',\n",
       "   'parent': 'B0014014AD',\n",
       "   'childtype': '301',\n",
       "   'name': '麓湖公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '麓湖路11号',\n",
       "   'location': '113.281797,23.151085',\n",
       "   'tel': '020-37222222;020-83593868',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413528201',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_350838;333610;39975',\n",
       "   'entr_location': '113.279374,23.147017',\n",
       "   'business_area': '登峰',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 13:59:29',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.3', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00141JP1Y ',\n",
       "     'name': ' 麓湖公园-停车场 ',\n",
       "     'sname': ' 停车场 ',\n",
       "     'location': '113.290642,23.151417',\n",
       "     'address': ' 麓湖路11号麓湖麓湖-白云仙馆附近 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'typecode': ' 150904 '}],\n",
       "   'photos': [{'title': '麓湖',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d051a41e2b6d8e683ded4e16fdab5566'},\n",
       "    {'title': '麓湖',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b4810317329b48512d23681fe041a3f2'},\n",
       "    {'title': '麓湖',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9a16377cf71fb8f01df6b293f472f0b2'}]},\n",
       "  {'id': 'B00140UFVY',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '海印公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '滨江东路498号(近海印大桥)',\n",
       "   'location': '113.287935,23.106383',\n",
       "   'tel': '020-34298885',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440105',\n",
       "   'adname': '海珠区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413522320',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_695543',\n",
       "   'entr_location': '113.288267,23.106624',\n",
       "   'business_area': '东晓',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-17 15:35:31',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.0', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/cfe462ff527d282905f722779bda852c'},\n",
       "    {'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/5be7c6b5c687ff26c3d621337066d551'},\n",
       "    {'title': '海印公园',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/dde6877a664bbe0e3b1872830212ab8a'}]},\n",
       "  {'id': 'B0FFF2O69D',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '双清园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '海月西街5号旁',\n",
       "   'location': '113.280539,23.119329',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413524201',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_747971',\n",
       "   'entr_location': [],\n",
       "   'business_area': '大东',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-17 15:52:28',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.5', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0acc343ee20aa585f7e4798c86c26cd6'}]},\n",
       "  {'id': 'B00140UFB8',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '流花湖公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '流花路100号',\n",
       "   'location': '113.250145,23.136891',\n",
       "   'tel': '020-86664095;020-86662196',\n",
       "   'postcode': [],\n",
       "   'website': 'www.liuhuahu.cn',\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413526010',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011042_355256',\n",
       "   'entr_location': '113.253857,23.139569',\n",
       "   'business_area': '东风',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 03:39:06',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.7', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00140HR0T ',\n",
       "     'name': ' 流花湖公园(西南门) ',\n",
       "     'sname': ' 西南门 ',\n",
       "     'location': '113.250754,23.133621',\n",
       "     'address': ' 东风西路163号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '},\n",
       "    {'id': ' B00140T0ZH ',\n",
       "     'name': ' 流花湖公园(东北门) ',\n",
       "     'sname': ' 东北门 ',\n",
       "     'location': '113.256231,23.139540',\n",
       "     'address': ' 流花路100号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '},\n",
       "    {'id': ' B00140T0ZI ',\n",
       "     'name': ' 流花湖公园(东门) ',\n",
       "     'sname': ' 东门 ',\n",
       "     'location': '113.256998,23.137426',\n",
       "     'address': ' 人民北路流花路100号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '},\n",
       "    {'id': ' B00140T0ZJ ',\n",
       "     'name': ' 流花湖公园(东南门) ',\n",
       "     'sname': ' 东南门 ',\n",
       "     'location': '113.255953,23.135724',\n",
       "     'address': ' 流花路100号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '},\n",
       "    {'id': ' B00141HXUR ',\n",
       "     'name': ' 流花湖公园-停车场 ',\n",
       "     'sname': ' 停车场 ',\n",
       "     'location': '113.253874,23.135100',\n",
       "     'address': ' 流花路100号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'typecode': ' 150904 '}],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/66f7cb4b27a5ad1e5acc1a7b79d106e6'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/25675c221460481a1388cbf83da2fd65'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0a3baf0a099fe2d988f77900edfe6c9f'}]},\n",
       "  {'id': 'B00140UFR2',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '晓港公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '前进路146号',\n",
       "   'location': '113.280706,23.096631',\n",
       "   'tel': '020-84474574',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440105',\n",
       "   'adname': '海珠区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413521211',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_695514',\n",
       "   'entr_location': '113.282123,23.098863',\n",
       "   'business_area': '昌岗',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-17 16:23:17',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.3', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00140B3DU ',\n",
       "     'name': ' 晓港公园(东门) ',\n",
       "     'sname': ' 东门 ',\n",
       "     'location': '113.283086,23.096087',\n",
       "     'address': ' 东晓路536号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991401 '},\n",
       "    {'id': ' B00140U4H7 ',\n",
       "     'name': ' 晓港公园(西门) ',\n",
       "     'sname': ' 西门 ',\n",
       "     'location': '113.278198,23.097064',\n",
       "     'address': ' 江南西路穗花一巷尽头 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '}],\n",
       "   'photos': [{'title': '晓港公园',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8b66e1bd7d25f4233196dea8fafb6bc2'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/eb2625f5622b3dac26c27c22a2107ae6'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/16192eb4426adad6ce43175465443624'}]},\n",
       "  {'id': 'B00141KZAW',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '百岁坊公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '中山四路与秉政街交叉口附近',\n",
       "   'location': '113.273607,23.125517',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413525102',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_192837',\n",
       "   'entr_location': '113.273787,23.125487',\n",
       "   'business_area': '建设',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-17 15:09:43',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.0', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0540c560c8ea26e89de8f098e737c481'},\n",
       "    {'title': '景点',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/6e1eb4ba92fb8266e89d552f7140eac5'},\n",
       "    {'title': '景点',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/13087530d6399261da3de92afc829c93'}]},\n",
       "  {'id': 'B00140UGBO',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '广州文化公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '西堤二马路37号',\n",
       "   'location': '113.251401,23.109669',\n",
       "   'tel': '020-81013963;020-81011981',\n",
       "   'postcode': [],\n",
       "   'website': 'www.gzwhgy.com',\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440103',\n",
       "   'adname': '荔湾区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413523000',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011042_277637;360974',\n",
       "   'entr_location': '113.251620,23.108623',\n",
       "   'business_area': '西关',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 13:35:19',\n",
       "   'alias': '文化公园',\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.5', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00140TXH6 ',\n",
       "     'name': ' 广州文化公园(东门) ',\n",
       "     'sname': ' 东门 ',\n",
       "     'location': '113.253649,23.110282',\n",
       "     'address': ' 西堤二马路37号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '},\n",
       "    {'id': ' B00140V3BB ',\n",
       "     'name': ' 广州文化公园(北门) ',\n",
       "     'sname': ' 北门 ',\n",
       "     'location': '113.250109,23.110578',\n",
       "     'address': ' 西堤二马路37号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991401 '},\n",
       "    {'id': ' B00140TXI7 ',\n",
       "     'name': ' 广州文化公园(正门) ',\n",
       "     'sname': ' 正门 ',\n",
       "     'location': '113.251622,23.108648',\n",
       "     'address': ' 西堤二马路37号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991401 '}],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/ae64ecc0f46afbe190ad72bd98e35af0'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/559ee1e880271c62a06b619d012644b7'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/56fc9789f01106b484d58af99e4aaf6c'}]},\n",
       "  {'id': 'B00141IAEZ',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '广州发展公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '二沙岛大通路',\n",
       "   'location': '113.306273,23.109624',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413523400',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_695528',\n",
       "   'entr_location': '113.301359,23.110254',\n",
       "   'business_area': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 04:31:08',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.0', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/90d53ffcfc2291f665ff6cf873f66d09'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e3764d95b4a54f3e2a152dc78ecac3a0'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a261480f65b8779e3163106da08420c4'}]},\n",
       "  {'id': 'B00140CEZD',\n",
       "   'parent': 'B0FFFAJYVI',\n",
       "   'childtype': '301',\n",
       "   'name': '沙面公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '沙面南街3号',\n",
       "   'location': '113.244941,23.105827',\n",
       "   'tel': '020-81217557',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440103',\n",
       "   'adname': '荔湾区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413512921',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011042_242348',\n",
       "   'entr_location': '113.244785,23.106074',\n",
       "   'business_area': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-21 17:28:52',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.5', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3438767c5ef9ee75897653951fdd1a39'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/559a3b53a310b38d66d33fd4'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8e517843bf49cda145455feef6bb83a7'}]},\n",
       "  {'id': 'B0FFF3B6QX',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '听潮苑',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '东濠涌高架路与内环路交叉口西南50米',\n",
       "   'location': '113.279355,23.114761',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413523221',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_354754',\n",
       "   'entr_location': '113.279321,23.115251',\n",
       "   'business_area': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-17 15:30:43',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/56a9e956a310218d5b4620d3'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/55acc2e8a310a084c90f640a'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/55acc2e8a310a084c90f640c'}]},\n",
       "  {'id': 'B00141VL8N',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '东山少爷公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '龟岗大马路与东华东路交口',\n",
       "   'location': '113.294237,23.119693',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413524311',\n",
       "   'distance': [],\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'business_area': '东湖',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-17 15:06:03',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.0', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/fc095881d894c04d7a8fc82b1695a039'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/42a2505398014f4d8c5a4551912b42cc'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a4e2ab3ef5fb5159bd67ffe783e1cf2f'}]},\n",
       "  {'id': 'B00140UFEW',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '广州兰圃',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '解放北路901',\n",
       "   'location': '113.260466,23.143743',\n",
       "   'tel': '020-86677255;020-86664602;020-86684179',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413527002',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_685619',\n",
       "   'entr_location': '113.260998,23.145783',\n",
       "   'business_area': '东风',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-13 15:42:47',\n",
       "   'alias': '兰圃',\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.4', 'cost': '8.00', 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00141RA16 ',\n",
       "     'name': ' 广州兰圃(东1门) ',\n",
       "     'sname': ' 东1门 ',\n",
       "     'location': '113.261479,23.145188',\n",
       "     'address': ' 大北立交与解放北路交叉口南100米 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '}],\n",
       "   'photos': [{'title': '广州兰圃',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/08675d1e3b4b9f38af9fbf3f581f84a8'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8a41fab208d1f38511f2c16cda47f973'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e184059da84e24c99d0c19fecfa673cf'}]},\n",
       "  {'id': 'B00141IAEI',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '二沙岛体育公园(装修中)',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '二沙岛大通路',\n",
       "   'location': '113.312744,23.108691',\n",
       "   'tel': '020-37580922',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413523500',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_176123',\n",
       "   'entr_location': '113.312548,23.107988',\n",
       "   'business_area': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 04:24:40',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.0', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/08e93e89401a6edddfa259724814a6d6'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/c899f3d078ad08153860b5ff419275f5'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/36c3609d4e989a62b468cf94f3a590bd'}]},\n",
       "  {'id': 'B00140ALXM',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '东风公园',\n",
       "   'tag': [],\n",
       "   'type': '风景名胜;公园广场;公园',\n",
       "   'typecode': '110101',\n",
       "   'biz_type': 'tour',\n",
       "   'address': '广州大道北199号(天河北路口)',\n",
       "   'location': '113.313235,23.142681',\n",
       "   'tel': '020-37597881;020-37597320',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440104',\n",
       "   'adname': '越秀区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3413527500',\n",
       "   'distance': [],\n",
       "   'navi_poiid': 'F49F011043_53933',\n",
       "   'entr_location': '113.314374,23.14279',\n",
       "   'business_area': '东风东',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-17 16:00:08',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': [], 'cmsid': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.3', 'cost': [], 'ticket_ordering': '0'},\n",
       "   'event': [],\n",
       "   'children': [{'id': ' B00140U3V2 ',\n",
       "     'name': ' 东风公园(北门) ',\n",
       "     'sname': ' 北门 ',\n",
       "     'location': '113.314070,23.143333',\n",
       "     'address': ' 水萌横路 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'typecode': ' 991400 '}],\n",
       "   'photos': [{'title': '东风公园',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1cc92a214e1445e3c4bd5bcbc1400122'},\n",
       "    {'title': '东风公园',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/896e5d283e470bf88fa39f88321f2ce2'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e74c879a89bc932bb0846efc12e70ff2'}]}]}"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 为了查询的精确，建议使用adcode\n",
    "# 在此接口之中，您可以通过city&citylimit参数指定希望搜索的城市或区县。而city参数能够接收citycode和adcode，citycode仅能精确到城市，而adcode却能够精确到区县。\n",
    "def place(keywords,types,city=None,citylimit=None,children=None,page=None,extensions=None,sig=None):\n",
    "    url='https://restapi.amap.com/v3/place/text?parameters'\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'keywords':keywords,\n",
    "        'types':types,\n",
    "        'city':city,\n",
    "        'citylimit':citylimit,\n",
    "        'children':children,\n",
    "        'page':page,\n",
    "        'extensions':extensions,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n",
    "\n",
    "\n",
    "广州_公园 = place('公园','大型',city=\"广州市\",children=1,extensions='all')\n",
    "广州_公园"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>parent</th>\n",
       "      <th>childtype</th>\n",
       "      <th>tag</th>\n",
       "      <th>type</th>\n",
       "      <th>typecode</th>\n",
       "      <th>biz_type</th>\n",
       "      <th>address</th>\n",
       "      <th>location</th>\n",
       "      <th>tel</th>\n",
       "      <th>...</th>\n",
       "      <th>event</th>\n",
       "      <th>children</th>\n",
       "      <th>photos</th>\n",
       "      <th>indoor_data.cpid</th>\n",
       "      <th>indoor_data.floor</th>\n",
       "      <th>indoor_data.truefloor</th>\n",
       "      <th>indoor_data.cmsid</th>\n",
       "      <th>biz_ext.rating</th>\n",
       "      <th>biz_ext.cost</th>\n",
       "      <th>biz_ext.ticket_ordering</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>东山湖公园</th>\n",
       "      <td>B00140D02H</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>东湖路123号</td>\n",
       "      <td>113.292052,23.115193</td>\n",
       "      <td>020-87609086;020-87775672</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00140BYJM ', 'name': ' 东山湖公园(北门) ',...</td>\n",
       "      <td>[{'title': '外景图', 'url': 'http://store.is.auto...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.5</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>越秀公园</th>\n",
       "      <td>B00140BNNF</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>解放北路988号</td>\n",
       "      <td>113.265609,23.140149</td>\n",
       "      <td>020-86661950</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00140U2CC ', 'name': ' 越秀公园(西门) ', ...</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.6</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人民公园</th>\n",
       "      <td>B00140UFEV</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>府前路</td>\n",
       "      <td>113.264369,23.127092</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00140T17L ', 'name': ' 人民公园(南门) ', ...</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.8</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黄花岗公园</th>\n",
       "      <td>B00140UETI</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>先烈中路79号</td>\n",
       "      <td>113.295129,23.139673</td>\n",
       "      <td>020-37588321;020-87326069</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'title': '外景图', 'url': 'http://store.is.auto...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>5.0</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广州雕塑公园</th>\n",
       "      <td>B00140U0TF</td>\n",
       "      <td>B0014014AD</td>\n",
       "      <td>301</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>下塘西路545号</td>\n",
       "      <td>113.27061,23.148845</td>\n",
       "      <td>020-86351663</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00140UD4N ', 'name': ' 广州雕塑公园(东南1门)...</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.6</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>云台花园</th>\n",
       "      <td>B00140H4G8</td>\n",
       "      <td>B0014014AD</td>\n",
       "      <td>301</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>广园中路801号白云山风景名胜区</td>\n",
       "      <td>113.29395,23.157315</td>\n",
       "      <td>020-37229187</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00140UG4C ', 'name': ' 云台花园(东南门) ',...</td>\n",
       "      <td>[{'title': '云台花园', 'url': 'http://store.is.aut...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.5</td>\n",
       "      <td>10.00</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>麓湖公园</th>\n",
       "      <td>B00140C5YX</td>\n",
       "      <td>B0014014AD</td>\n",
       "      <td>301</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>麓湖路11号</td>\n",
       "      <td>113.281797,23.151085</td>\n",
       "      <td>020-37222222;020-83593868</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00141JP1Y ', 'name': ' 麓湖公园-停车场 ', ...</td>\n",
       "      <td>[{'title': '麓湖', 'url': 'http://store.is.auton...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.3</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>海印公园</th>\n",
       "      <td>B00140UFVY</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>滨江东路498号(近海印大桥)</td>\n",
       "      <td>113.287935,23.106383</td>\n",
       "      <td>020-34298885</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.0</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>双清园</th>\n",
       "      <td>B0FFF2O69D</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>海月西街5号旁</td>\n",
       "      <td>113.280539,23.119329</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.5</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>流花湖公园</th>\n",
       "      <td>B00140UFB8</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>流花路100号</td>\n",
       "      <td>113.250145,23.136891</td>\n",
       "      <td>020-86664095;020-86662196</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00140HR0T ', 'name': ' 流花湖公园(西南门) '...</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.7</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>晓港公园</th>\n",
       "      <td>B00140UFR2</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>前进路146号</td>\n",
       "      <td>113.280706,23.096631</td>\n",
       "      <td>020-84474574</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00140B3DU ', 'name': ' 晓港公园(东门) ', ...</td>\n",
       "      <td>[{'title': '晓港公园', 'url': 'http://store.is.aut...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.3</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>百岁坊公园</th>\n",
       "      <td>B00141KZAW</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>中山四路与秉政街交叉口附近</td>\n",
       "      <td>113.273607,23.125517</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.0</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广州文化公园</th>\n",
       "      <td>B00140UGBO</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>西堤二马路37号</td>\n",
       "      <td>113.251401,23.109669</td>\n",
       "      <td>020-81013963;020-81011981</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00140TXH6 ', 'name': ' 广州文化公园(东门) '...</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.5</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广州发展公园</th>\n",
       "      <td>B00141IAEZ</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>二沙岛大通路</td>\n",
       "      <td>113.306273,23.109624</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.0</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>沙面公园</th>\n",
       "      <td>B00140CEZD</td>\n",
       "      <td>B0FFFAJYVI</td>\n",
       "      <td>301</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>沙面南街3号</td>\n",
       "      <td>113.244941,23.105827</td>\n",
       "      <td>020-81217557</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.5</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>听潮苑</th>\n",
       "      <td>B0FFF3B6QX</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>东濠涌高架路与内环路交叉口西南50米</td>\n",
       "      <td>113.279355,23.114761</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>东山少爷公园</th>\n",
       "      <td>B00141VL8N</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>龟岗大马路与东华东路交口</td>\n",
       "      <td>113.294237,23.119693</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.0</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广州兰圃</th>\n",
       "      <td>B00140UFEW</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>解放北路901</td>\n",
       "      <td>113.260466,23.143743</td>\n",
       "      <td>020-86677255;020-86664602;020-86684179</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00141RA16 ', 'name': ' 广州兰圃(东1门) ',...</td>\n",
       "      <td>[{'title': '广州兰圃', 'url': 'http://store.is.aut...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.4</td>\n",
       "      <td>8.00</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>二沙岛体育公园(装修中)</th>\n",
       "      <td>B00141IAEI</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>二沙岛大通路</td>\n",
       "      <td>113.312744,23.108691</td>\n",
       "      <td>020-37580922</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'title': [], 'url': 'http://store.is.autonav...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.0</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>东风公园</th>\n",
       "      <td>B00140ALXM</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>风景名胜;公园广场;公园</td>\n",
       "      <td>110101</td>\n",
       "      <td>tour</td>\n",
       "      <td>广州大道北199号(天河北路口)</td>\n",
       "      <td>113.313235,23.142681</td>\n",
       "      <td>020-37597881;020-37597320</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'id': ' B00140U3V2 ', 'name': ' 东风公园(北门) ', ...</td>\n",
       "      <td>[{'title': '东风公园', 'url': 'http://store.is.aut...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.3</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>20 rows × 46 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                      id      parent childtype tag          type typecode  \\\n",
       "name                                                                        \n",
       "东山湖公园         B00140D02H          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "越秀公园          B00140BNNF          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "人民公园          B00140UFEV          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "黄花岗公园         B00140UETI          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "广州雕塑公园        B00140U0TF  B0014014AD       301  []  风景名胜;公园广场;公园   110101   \n",
       "云台花园          B00140H4G8  B0014014AD       301  []  风景名胜;公园广场;公园   110101   \n",
       "麓湖公园          B00140C5YX  B0014014AD       301  []  风景名胜;公园广场;公园   110101   \n",
       "海印公园          B00140UFVY          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "双清园           B0FFF2O69D          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "流花湖公园         B00140UFB8          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "晓港公园          B00140UFR2          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "百岁坊公园         B00141KZAW          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "广州文化公园        B00140UGBO          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "广州发展公园        B00141IAEZ          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "沙面公园          B00140CEZD  B0FFFAJYVI       301  []  风景名胜;公园广场;公园   110101   \n",
       "听潮苑           B0FFF3B6QX          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "东山少爷公园        B00141VL8N          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "广州兰圃          B00140UFEW          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "二沙岛体育公园(装修中)  B00141IAEI          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "东风公园          B00140ALXM          []        []  []  风景名胜;公园广场;公园   110101   \n",
       "\n",
       "             biz_type             address              location  \\\n",
       "name                                                              \n",
       "东山湖公园            tour             东湖路123号  113.292052,23.115193   \n",
       "越秀公园             tour            解放北路988号  113.265609,23.140149   \n",
       "人民公园             tour                 府前路  113.264369,23.127092   \n",
       "黄花岗公园            tour             先烈中路79号  113.295129,23.139673   \n",
       "广州雕塑公园           tour            下塘西路545号   113.27061,23.148845   \n",
       "云台花园             tour    广园中路801号白云山风景名胜区   113.29395,23.157315   \n",
       "麓湖公园             tour              麓湖路11号  113.281797,23.151085   \n",
       "海印公园             tour     滨江东路498号(近海印大桥)  113.287935,23.106383   \n",
       "双清园              tour             海月西街5号旁  113.280539,23.119329   \n",
       "流花湖公园            tour             流花路100号  113.250145,23.136891   \n",
       "晓港公园             tour             前进路146号  113.280706,23.096631   \n",
       "百岁坊公园            tour       中山四路与秉政街交叉口附近  113.273607,23.125517   \n",
       "广州文化公园           tour            西堤二马路37号  113.251401,23.109669   \n",
       "广州发展公园           tour              二沙岛大通路  113.306273,23.109624   \n",
       "沙面公园             tour              沙面南街3号  113.244941,23.105827   \n",
       "听潮苑              tour  东濠涌高架路与内环路交叉口西南50米  113.279355,23.114761   \n",
       "东山少爷公园           tour        龟岗大马路与东华东路交口  113.294237,23.119693   \n",
       "广州兰圃             tour             解放北路901  113.260466,23.143743   \n",
       "二沙岛体育公园(装修中)     tour              二沙岛大通路  113.312744,23.108691   \n",
       "东风公园             tour    广州大道北199号(天河北路口)  113.313235,23.142681   \n",
       "\n",
       "                                                 tel  ... event  \\\n",
       "name                                                  ...         \n",
       "东山湖公园                      020-87609086;020-87775672  ...    []   \n",
       "越秀公园                                    020-86661950  ...    []   \n",
       "人民公园                                              []  ...    []   \n",
       "黄花岗公园                      020-37588321;020-87326069  ...    []   \n",
       "广州雕塑公园                                  020-86351663  ...    []   \n",
       "云台花园                                    020-37229187  ...    []   \n",
       "麓湖公园                       020-37222222;020-83593868  ...    []   \n",
       "海印公园                                    020-34298885  ...    []   \n",
       "双清园                                               []  ...    []   \n",
       "流花湖公园                      020-86664095;020-86662196  ...    []   \n",
       "晓港公园                                    020-84474574  ...    []   \n",
       "百岁坊公园                                             []  ...    []   \n",
       "广州文化公园                     020-81013963;020-81011981  ...    []   \n",
       "广州发展公园                                            []  ...    []   \n",
       "沙面公园                                    020-81217557  ...    []   \n",
       "听潮苑                                               []  ...    []   \n",
       "东山少爷公园                                            []  ...    []   \n",
       "广州兰圃          020-86677255;020-86664602;020-86684179  ...    []   \n",
       "二沙岛体育公园(装修中)                            020-37580922  ...    []   \n",
       "东风公园                       020-37597881;020-37597320  ...    []   \n",
       "\n",
       "                                                       children  \\\n",
       "name                                                              \n",
       "东山湖公园         [{'id': ' B00140BYJM ', 'name': ' 东山湖公园(北门) ',...   \n",
       "越秀公园          [{'id': ' B00140U2CC ', 'name': ' 越秀公园(西门) ', ...   \n",
       "人民公园          [{'id': ' B00140T17L ', 'name': ' 人民公园(南门) ', ...   \n",
       "黄花岗公园                                                        []   \n",
       "广州雕塑公园        [{'id': ' B00140UD4N ', 'name': ' 广州雕塑公园(东南1门)...   \n",
       "云台花园          [{'id': ' B00140UG4C ', 'name': ' 云台花园(东南门) ',...   \n",
       "麓湖公园          [{'id': ' B00141JP1Y ', 'name': ' 麓湖公园-停车场 ', ...   \n",
       "海印公园                                                         []   \n",
       "双清园                                                          []   \n",
       "流花湖公园         [{'id': ' B00140HR0T ', 'name': ' 流花湖公园(西南门) '...   \n",
       "晓港公园          [{'id': ' B00140B3DU ', 'name': ' 晓港公园(东门) ', ...   \n",
       "百岁坊公园                                                        []   \n",
       "广州文化公园        [{'id': ' B00140TXH6 ', 'name': ' 广州文化公园(东门) '...   \n",
       "广州发展公园                                                       []   \n",
       "沙面公园                                                         []   \n",
       "听潮苑                                                          []   \n",
       "东山少爷公园                                                       []   \n",
       "广州兰圃          [{'id': ' B00141RA16 ', 'name': ' 广州兰圃(东1门) ',...   \n",
       "二沙岛体育公园(装修中)                                                 []   \n",
       "东风公园          [{'id': ' B00140U3V2 ', 'name': ' 东风公园(北门) ', ...   \n",
       "\n",
       "                                                         photos  \\\n",
       "name                                                              \n",
       "东山湖公园         [{'title': '外景图', 'url': 'http://store.is.auto...   \n",
       "越秀公园          [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "人民公园          [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "黄花岗公园         [{'title': '外景图', 'url': 'http://store.is.auto...   \n",
       "广州雕塑公园        [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "云台花园          [{'title': '云台花园', 'url': 'http://store.is.aut...   \n",
       "麓湖公园          [{'title': '麓湖', 'url': 'http://store.is.auton...   \n",
       "海印公园          [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "双清园           [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "流花湖公园         [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "晓港公园          [{'title': '晓港公园', 'url': 'http://store.is.aut...   \n",
       "百岁坊公园         [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "广州文化公园        [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "广州发展公园        [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "沙面公园          [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "听潮苑           [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "东山少爷公园        [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "广州兰圃          [{'title': '广州兰圃', 'url': 'http://store.is.aut...   \n",
       "二沙岛体育公园(装修中)  [{'title': [], 'url': 'http://store.is.autonav...   \n",
       "东风公园          [{'title': '东风公园', 'url': 'http://store.is.aut...   \n",
       "\n",
       "             indoor_data.cpid indoor_data.floor indoor_data.truefloor  \\\n",
       "name                                                                    \n",
       "东山湖公园                      []                []                    []   \n",
       "越秀公园                       []                []                    []   \n",
       "人民公园                       []                []                    []   \n",
       "黄花岗公园                      []                []                    []   \n",
       "广州雕塑公园                     []                []                    []   \n",
       "云台花园                       []                []                    []   \n",
       "麓湖公园                       []                []                    []   \n",
       "海印公园                       []                []                    []   \n",
       "双清园                        []                []                    []   \n",
       "流花湖公园                      []                []                    []   \n",
       "晓港公园                       []                []                    []   \n",
       "百岁坊公园                      []                []                    []   \n",
       "广州文化公园                     []                []                    []   \n",
       "广州发展公园                     []                []                    []   \n",
       "沙面公园                       []                []                    []   \n",
       "听潮苑                        []                []                    []   \n",
       "东山少爷公园                     []                []                    []   \n",
       "广州兰圃                       []                []                    []   \n",
       "二沙岛体育公园(装修中)               []                []                    []   \n",
       "东风公园                       []                []                    []   \n",
       "\n",
       "             indoor_data.cmsid biz_ext.rating biz_ext.cost  \\\n",
       "name                                                         \n",
       "东山湖公园                       []            4.5           []   \n",
       "越秀公园                        []            4.6           []   \n",
       "人民公园                        []            4.8           []   \n",
       "黄花岗公园                       []            5.0           []   \n",
       "广州雕塑公园                      []            4.6           []   \n",
       "云台花园                        []            4.5        10.00   \n",
       "麓湖公园                        []            4.3           []   \n",
       "海印公园                        []            4.0           []   \n",
       "双清园                         []            4.5           []   \n",
       "流花湖公园                       []            4.7           []   \n",
       "晓港公园                        []            4.3           []   \n",
       "百岁坊公园                       []            4.0           []   \n",
       "广州文化公园                      []            4.5           []   \n",
       "广州发展公园                      []            4.0           []   \n",
       "沙面公园                        []            4.5           []   \n",
       "听潮苑                         []             []           []   \n",
       "东山少爷公园                      []            4.0           []   \n",
       "广州兰圃                        []            4.4         8.00   \n",
       "二沙岛体育公园(装修中)                []            4.0           []   \n",
       "东风公园                        []            4.3           []   \n",
       "\n",
       "             biz_ext.ticket_ordering  \n",
       "name                                  \n",
       "东山湖公园                              0  \n",
       "越秀公园                               0  \n",
       "人民公园                               0  \n",
       "黄花岗公园                              0  \n",
       "广州雕塑公园                             0  \n",
       "云台花园                               0  \n",
       "麓湖公园                               0  \n",
       "海印公园                               0  \n",
       "双清园                                0  \n",
       "流花湖公园                              0  \n",
       "晓港公园                               0  \n",
       "百岁坊公园                              0  \n",
       "广州文化公园                             0  \n",
       "广州发展公园                             0  \n",
       "沙面公园                               0  \n",
       "听潮苑                                0  \n",
       "东山少爷公园                             0  \n",
       "广州兰圃                               0  \n",
       "二沙岛体育公园(装修中)                       0  \n",
       "东风公园                               0  \n",
       "\n",
       "[20 rows x 46 columns]"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_park=pd.json_normalize(广州_公园['pois']).set_index(['name']).rename(columns={\"name\":\"park\"})\n",
    "df_park\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.4.1周边搜索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [],
   "source": [
    "def place_around(location,keywords=None,types=None,city=None,radius=None,sortrule=None,offset=None,page=None,extensions=None):\n",
    "    url='https://restapi.amap.com/v3/place/around?parameters '\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'location':location,\n",
    "        'keywords':keywords,\n",
    "        'types':types,\n",
    "        'city':city,\n",
    "        'radius':radius,\n",
    "        'sortrule':sortrule,\n",
    "        'offset':offset,\n",
    "        'page':page,\n",
    "        'extensions':extensions,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.632403,23.616941'"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 先用geocode获取location\n",
    "温泉镇=geocode('广东省广州市从化区温泉镇')\n",
    "温泉镇_location=温泉镇['geocodes'][0]['location']\n",
    "温泉镇_location"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '328',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'suggestion': {'keywords': [], 'cities': []},\n",
       " 'pois': [{'id': 'B0FFFYWR17',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '富力泉天下银泉别墅',\n",
       "   'type': '商务住宅;商务住宅相关;商务住宅相关',\n",
       "   'typecode': '120000',\n",
       "   'biz_type': [],\n",
       "   'address': '从化温泉镇温泉大道836号',\n",
       "   'location': '113.632546,23.616653',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353021',\n",
       "   'distance': '35',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-14 18:24:14',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': '温泉',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': []},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B00141JCU0',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': '灵芝猪,泥焗鸡,天麻水库鱼头汤,排骨汤,时菜炒肉片,高山番薯,鹌鹑饭,鸡子煲猪肚,鱼香茄子煲,木瓜鲫鱼汤,迟菜心,辣子鸡,鸭子饭,手撕鸡饭,酸菜炒杂,沙姜焗土鸡,农家青菜,客家让豆腐,山坑鱼仔,药膳浸鸡,农家油菜,蒜子南瓜煲,酸菜炒鸡什,尖椒炒牛肉,铜盘蒸走地鸡',\n",
       "   'name': '桃李园农家菜(二十年老字号店)',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '温泉大道399号(温泉镇政府旁)',\n",
       "   'location': '113.633172,23.617092',\n",
       "   'tel': '020-87832123',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513354001',\n",
       "   'distance': '80',\n",
       "   'navi_poiid': 'F49F005046_632',\n",
       "   'entr_location': '113.633328,23.616954',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-03-27 11:45:36',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': '温泉',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '3.5', 'cost': '45.00', 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/c9d49d1784f13aeb8960b84bc33ceb49'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/313d7a0a1f030b55621fad04efb34c45'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/59d979f2bb163ed1a4cbb7842eb738a4'}],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFGD2VIF',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': '支竹猪肚煲,咸鱼蒸猪肉,柴火焖鸭,煎酿豆腐煲,和味山坑螺,咸鱼茄子煲,特色烧鸡,清蒸河鱼仔,石螺蒸排骨,炒时蔬,本地鸡,椒丝腐乳炒通菜,蒸山坑鱼仔,菜心,饺子,例汤,虎皮尖椒,脆皮大肠头,鼓汁蒸排骨,特色莲藕芽炒肾球,从化水库瘦身鲩鱼,招牌五指毛桃焗鸡,小食,柴火捺鹅,尖椒回锅肉',\n",
       "   'name': '万达农庄',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '温泉大道678号',\n",
       "   'location': '113.633875,23.616519',\n",
       "   'tel': '13922390169;020-87832169',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353022',\n",
       "   'distance': '157',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': '113.63376,23.616734',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 10:59:50',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': '温泉',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '3.5', 'cost': [], 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9d06dd65707ae674b1af8197386596ca'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/cd1a57d7e562f8085602895454da9c4a'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9a8c8141a9321b20be66a6a6091947fb'}],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFIIIH5Q',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '众善木雕厂家店',\n",
       "   'type': '生活服务;生活服务场所;生活服务场所',\n",
       "   'typecode': '070000',\n",
       "   'biz_type': [],\n",
       "   'address': '温泉大道342附近',\n",
       "   'location': '113.632909,23.615221',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353021',\n",
       "   'distance': '198',\n",
       "   'navi_poiid': 'F49F005046_8215',\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-03 17:36:47',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': '温泉',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': []},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFFYPGZ5',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '君雅农庄',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '温泉镇温泉大道371号',\n",
       "   'location': '113.631762,23.614329',\n",
       "   'tel': '13922787887;020-87930377;13826283877',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353021',\n",
       "   'distance': '298',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 10:42:59',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': '温泉',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '3.5', 'cost': '44.00', 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/53eeaba1629fb519253d418fb944288a'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/362f68cbfd410d3af609003927dff123'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/54ef1eeb13646b688c0a6737717969f8'}],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFJKS6XK',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '广州艺科风暴创新创业孵化基地',\n",
       "   'type': '商务住宅;商务住宅相关;商务住宅相关',\n",
       "   'typecode': '120000',\n",
       "   'biz_type': [],\n",
       "   'address': '温泉大道411号',\n",
       "   'location': '113.634874,23.619189',\n",
       "   'tel': '020-37977331',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513354002',\n",
       "   'distance': '355',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': '113.635199,23.618554',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-03-26 16:06:50',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': '温泉',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': []},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFH2P56X',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '易亨食坊',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '温泉大道339号附近',\n",
       "   'location': '113.631515,23.612658',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353011',\n",
       "   'distance': '485',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-03-18 19:50:07',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '3.5', 'cost': [], 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFF4WXNX',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '华辉度假村-餐厅',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '温泉镇云星大道流溪河畔华辉度假村',\n",
       "   'location': '113.634310,23.621130',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513354012',\n",
       "   'distance': '505',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-08 20:06:28',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': '温泉',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': [], 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFJ7IK2Q',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '乌石农家菜',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '935县道西50米',\n",
       "   'location': '113.629195,23.620590',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513354011',\n",
       "   'distance': '521',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-08 19:40:19',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': [], 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFF4TEGJ',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': '泥焗鸡,红糖糕,煎让豆腐,特色山坑螺,荔枝柴火捺鹅,姜葱炒生肠,桂峰酿豆腐,酸笋炒鸡杂,芋头地瓜丸,绿茶饼,招牌烧鸡,手打墨鱼饼,特色山坑鱼仔,上汤时菜,砂锅焗鸡,上汤桑叶,水煮牛肉,凉瓜炒牛肉,酸菜炒大肠,柴火焗鹅,特色时蔬,可乐,奶黄包,咕噜肉,沙富鱼头煲',\n",
       "   'name': '聚源农庄',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '从化温泉镇105国道旁',\n",
       "   'location': '113.635523,23.622401',\n",
       "   'tel': '13724050661;13924000200',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513354022',\n",
       "   'distance': '686',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-23 10:04:49',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': '温泉',\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '4.5', 'cost': '41.00', 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a7931576da3a9234c8800bb7e7edb0b8'},\n",
       "    {'title': '环境',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/7075f6a9a498754738f7006714ab0e8b'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b39d6888a091bc27d0d66085600238d0'}],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFIIIH5A',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '高安饭店',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '温泉大道348号附近',\n",
       "   'location': '113.631194,23.610748',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353001',\n",
       "   'distance': '700',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': '113.630966,23.610785',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-07 23:25:39',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': [], 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFL6PGV2',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '申通快递',\n",
       "   'type': '生活服务;物流速递;物流速递',\n",
       "   'typecode': '070500',\n",
       "   'biz_type': [],\n",
       "   'address': '温泉大道460西北90米',\n",
       "   'location': '113.630585,23.610650',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353001',\n",
       "   'distance': '724',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-03-07 10:35:59',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': []},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFI5R0GW',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '韵达速递',\n",
       "   'type': '生活服务;物流速递;物流速递',\n",
       "   'typecode': '070500',\n",
       "   'biz_type': [],\n",
       "   'address': '温泉大道与花卉大道交叉口东北100米',\n",
       "   'location': '113.630579,23.610626',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353001',\n",
       "   'distance': '727',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': '113.630767,23.610522',\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-14 18:53:31',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': []},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFL1JFMY',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': '铁板鹅肠,酸甜排骨,蒸手打肉丸,豉汁水库叉尾鱼,蒸水库瘦身鲩鱼,豉汁蒸排骨,紫苏蒸山坑鱼仔,青椒炒鸡杂,凉瓜炒蛋,姜葱炒河蚌,韭菜炒山坑鱼仔,鱼香茄子煲,三丝炒面,蛋肉炒米粉,三丝炒米粉,酸甜咕噜肉,柴火本地鹅,回锅肉,姜葱爆炒墨鱼,茶树菇炒牛肉,上汤时蔬,香煎韭菜饺,排骨粥,铁板鱿鱼须,椒盐山坑鱼仔',\n",
       "   'name': '锦兴美食',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '温泉镇温泉大道317号',\n",
       "   'location': '113.630579,23.610625',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353001',\n",
       "   'distance': '727',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-07 21:12:34',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': [], 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFJY7O14',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '甘稻农庄',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '温泉镇温泉大道299号',\n",
       "   'location': '113.630384,23.610242',\n",
       "   'tel': '13922391395',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353001',\n",
       "   'distance': '773',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-03-20 17:22:29',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': '35.00', 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/D8C93B2C09904272853811A00B370E9A'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/7183DF8FB7A64E95A65740D9B750E64D'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3F3E520E084747949DC8854600632FFA'}],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFLOOD7S',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '从化市温泉乌石近溪农庄',\n",
       "   'type': '餐饮服务;中餐厅;广东菜(粤菜)',\n",
       "   'typecode': '050103',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '乌石村38号近溪农庄',\n",
       "   'location': '113.626733,23.621891',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513354010',\n",
       "   'distance': '798',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-04-01 23:16:01',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': [], 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/7c6dd8c502870829e84101f7c3852e5a'}],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFLJVTF5',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '地道农家菜馆',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': [],\n",
       "   'location': '113.629770,23.610081',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353001',\n",
       "   'distance': '809',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-03-26 16:19:40',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': [], 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFG6YXOK',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': '水库鱼',\n",
       "   'name': '顺景农庄',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '温泉镇105国道云星路段花卉大道1号',\n",
       "   'location': '113.629770,23.610081',\n",
       "   'tel': '020-87832648;13928922009',\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353001',\n",
       "   'distance': '809',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-03-30 11:58:58',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': '5.0', 'cost': '30.00', 'meal_ordering': '0'},\n",
       "   'event': [],\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/bda6f0424781a04a56429fad8579dc6b'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d06a82286f5f51f8659f2645bb17da36'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a219b4c14ad70b9fe91cd5eaea51e057'}],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFJJ4DGO',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '广州市从化区供销社再发废旧物资回收有限公司第五十四收购站',\n",
       "   'type': '生活服务;生活服务场所;生活服务场所',\n",
       "   'typecode': '070000',\n",
       "   'biz_type': [],\n",
       "   'address': '温泉镇云星村新岗街',\n",
       "   'location': '113.629550,23.609968',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353001',\n",
       "   'distance': '828',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2020-02-18 11:30:55',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': []},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []},\n",
       "  {'id': 'B0FFLL9X6B',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'tag': [],\n",
       "   'name': '收废品',\n",
       "   'type': '生活服务;生活服务场所;生活服务场所',\n",
       "   'typecode': '070000',\n",
       "   'biz_type': [],\n",
       "   'address': [],\n",
       "   'location': '113.629621,23.609893',\n",
       "   'tel': [],\n",
       "   'postcode': [],\n",
       "   'website': [],\n",
       "   'email': [],\n",
       "   'pcode': '440000',\n",
       "   'pname': '广东省',\n",
       "   'citycode': '020',\n",
       "   'cityname': '广州市',\n",
       "   'adcode': '440117',\n",
       "   'adname': '从化区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'gridcode': '3513353001',\n",
       "   'distance': '834',\n",
       "   'navi_poiid': [],\n",
       "   'entr_location': [],\n",
       "   'exit_location': [],\n",
       "   'match': '0',\n",
       "   'recommend': '0',\n",
       "   'timestamp': '2019-12-30 10:13:40',\n",
       "   'alias': [],\n",
       "   'indoor_map': '0',\n",
       "   'indoor_data': {'cpid': [], 'floor': [], 'truefloor': []},\n",
       "   'groupbuy_num': '0',\n",
       "   'business_area': [],\n",
       "   'discount_num': '0',\n",
       "   'biz_ext': {'rating': [], 'cost': []},\n",
       "   'event': [],\n",
       "   'photos': [],\n",
       "   'children': []}]}"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "温泉镇_around=place_around(温泉镇_location,extensions='all')\n",
    "温泉镇_around"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'440117'"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "温泉镇_adcode=温泉镇_around['pois'][0]['adcode']\n",
    "温泉镇_adcode"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.5静态地图\n",
    "### 服务通过返回一张地图图片响应HTTP请求，使用户能够将高德地图以图片形式嵌入自己的网页中。\n",
    "用户可以指定请求的地图位置、图片大小、以及在地图上添加覆盖物，如标签、标注、折线、多边形。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [],
   "source": [
    "from PIL import Image\n",
    "from io import BytesIO\n",
    "def staticmap(location,zoom,size=None,scale=1,markers=None,labels=None,paths=None,traffic=0,page=None,sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/staticmap?parameters'\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'location':location,\n",
    "        'zoom':zoom,\n",
    "        'size':size,\n",
    "        'scale':scale,\n",
    "        'markers':markers,\n",
    "        'labels':labels,\n",
    "        'paths':paths,\n",
    "        'traffic':traffic,\n",
    "        'sig':sig,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = Image.open(BytesIO(response.content))\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAADAFBMVEXv7Ob+/vz8+/3++/xkqZGurKfq6eb7+/nv7eb69e/++f7s6eTe2c+oqav6+ff9/Pnx8e+pq6z29O37+vri3NL08ez49vHr6eT59u708/Du7umTct7s6uX3/OHe2M6qqab18ur7+vf5+PL8+vXKexb19fbj79X69/MpaaLe2c78+/ji3dPPii/z8u3s6eJoaWr49e748+vm4tnV1NLZ2NXf2dD39O7f2tDw27Xw3cDg29H6+vvf2c/28+z39/Tp5NvFbwDw7uv7+PNNTUtiZGf1z44/Pjzm4dj48+l8fYDj3tXq6OKurqt1dHP27+P5+Pjr5977+fVlZWLv7uvMhCSJiowtLSvz9PS/wL/f39/u7Obx8Ozo49nx7+v6+fna1s6PvOscGxqGh4r59vL08ur69/Hq6unht2yxsbHh3NJvcXL48ej8+/nh3dPGxsG6urv93XP08Oh3eHrIeA/j4+LowXfnx5Xfs2dbWln49O3x7+ni3dTMysf39/Xk4NfNzc30zoz4+Pbt7OjFxsfg2tDe2M22trWhn5yTlZfesWTn5d/R0M6zs7P08/Hv7OPz8OrS0tPdnD/qwn/htnT9/Pvt6+f29PGZmpz39vXr5+D29fPc1s3z8u/Z2djiu4DkiwCQkZLKy8vk39bku3Xj4dz49/fm4tvz8Or7+vni3tacppPwyYWEhYbv7Of18uvy8O3oy566vFj39/bzzIm9vbzr06yAgYDxynjhtm/bqWHu7Ons6uXy7ufdr2fkwY3ftGnc3Nvp5d7H3Pj9/PwFj/zn5N1kZmmlpqbn5uTu6+fu6uRrbG7g29L39e+LjY7o5uCfoaLw7efBwcDi3dPr6eTv7Obw7uny48zv7em5uLbv7+329fP59e3z8e7v6uD8/Puor7H6+PT8+/r169n9/fzu7OeFX9rf2c76+fhhY2b08/Csq6r8+vj7+/r39O2LkJLFcQKtrKv20I/z8u/19PH8/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ugin.PngImageFile image mode=P size=400x400 at 0x1E16277F1D0>"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "staticmap(温泉镇_location,zoom=17)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.6IP定位\n",
    "### 根据用户输入的IP地址，能够快速的帮用户定位IP的所在位置"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [],
   "source": [
    "def ip(ip=None,sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/ip?parameters'\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'ip':ip,\n",
    "        'output':'json',\n",
    "        'sig':'sig'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'province': '云南省',\n",
       " 'city': '昆明市',\n",
       " 'adcode': '530100',\n",
       " 'rectangle': '102.6358652,24.97405712;102.7924848,25.10935427'}"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ip(ip=\"116.52.22.63\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.7批量接口\n",
    "### 通过用户传入合并后的请求，同时返回多个请求的顺序集合，目前最多支持20个子请求。 返回的顺序与子请求的顺序一致"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '0', 'info': 'INVALID_BATCH_PARAM', 'infocode': '20005'}"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def batch():\n",
    "    url='https://restapi.amap.com/v3/batch?key='+key_wenpur\n",
    "    headers={\n",
    "        'content-type':'application/json',\n",
    "    }\n",
    "    body='''\n",
    "    {\n",
    "    \"ops\": [\n",
    "        {\n",
    "            \"url\": \"/v3/place/around?offset=10&page=1&key=<您的key>&location=116.50394379585519,39.278209477408794&output=json&radius=100000&types=080000\"\n",
    "        },\n",
    "        {\n",
    "            \"url\": \"/v3/place/around?offset=10&page=1&key=<您的key>&location=118.50394379585519,39.278209477408794&output=json&radius=100000&types=080000\"\n",
    "        }\n",
    "    ]\n",
    "}\n",
    "    '''\n",
    "\n",
    "    response = requests.post(url,headers,body)\n",
    "    data = response.json()\n",
    "    return data\n",
    "batch()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.8坐标转换\n",
    "### 能够将用户输入的非高德坐标（GPS坐标、mapbar坐标、baidu坐标）转换成高德坐标。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [],
   "source": [
    "def coordinate(locations,coordsys=None,sig=None)->dict:  \n",
    "   \n",
    "    url = 'https://restapi.amap.com/v3/assistant/coordinate/convert?parameters'\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'locations':locations,   \n",
    "        'coordsys':coordsys,        \n",
    "        'output':'json'\n",
    "    }   \n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'ok',\n",
       " 'infocode': '10000',\n",
       " 'locations': '113.868293,27.637853'}"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "武功山=geocode('江西省萍乡市武功山')\n",
    "\n",
    "武功山_location=武功山['geocodes'][0]['location']\n",
    "坐标转换 = coordinate(武功山_location)\n",
    "坐标转换"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.9天气查询:\n",
    "### 根据用户输入的adcode，查询目标区域当前/未来的天气情况"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [],
   "source": [
    "def place_around(city,extensions=None):\n",
    "    url='https://restapi.amap.com/v3/weather/weatherInfo?parameters'\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'city':city,\n",
    "        'extensions':extensions,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'forecasts': [{'city': '从化区',\n",
       "   'adcode': '440117',\n",
       "   'province': '广东',\n",
       "   'reporttime': '2020-04-23 17:22:31',\n",
       "   'casts': [{'date': '2020-04-23',\n",
       "     'week': '4',\n",
       "     'dayweather': '小雨-中雨',\n",
       "     'nightweather': '中雨-大雨',\n",
       "     'daytemp': '20',\n",
       "     'nighttemp': '13',\n",
       "     'daywind': '无风向',\n",
       "     'nightwind': '无风向',\n",
       "     'daypower': '≤3',\n",
       "     'nightpower': '≤3'},\n",
       "    {'date': '2020-04-24',\n",
       "     'week': '5',\n",
       "     'dayweather': '中雨-大雨',\n",
       "     'nightweather': '阵雨',\n",
       "     'daytemp': '17',\n",
       "     'nighttemp': '12',\n",
       "     'daywind': '无风向',\n",
       "     'nightwind': '无风向',\n",
       "     'daypower': '≤3',\n",
       "     'nightpower': '≤3'},\n",
       "    {'date': '2020-04-25',\n",
       "     'week': '6',\n",
       "     'dayweather': '阵雨',\n",
       "     'nightweather': '阵雨',\n",
       "     'daytemp': '20',\n",
       "     'nighttemp': '15',\n",
       "     'daywind': '无风向',\n",
       "     'nightwind': '无风向',\n",
       "     'daypower': '≤3',\n",
       "     'nightpower': '≤3'},\n",
       "    {'date': '2020-04-26',\n",
       "     'week': '7',\n",
       "     'dayweather': '阵雨',\n",
       "     'nightweather': '多云',\n",
       "     'daytemp': '22',\n",
       "     'nighttemp': '16',\n",
       "     'daywind': '无风向',\n",
       "     'nightwind': '无风向',\n",
       "     'daypower': '≤3',\n",
       "     'nightpower': '≤3'}]}]}"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "温泉镇_weather=place_around(city=温泉镇_adcode,extensions='all')\n",
    "温泉镇_weather"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>week</th>\n",
       "      <th>dayweather</th>\n",
       "      <th>nightweather</th>\n",
       "      <th>daytemp</th>\n",
       "      <th>nighttemp</th>\n",
       "      <th>daywind</th>\n",
       "      <th>nightwind</th>\n",
       "      <th>daypower</th>\n",
       "      <th>nightpower</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020-04-23</td>\n",
       "      <td>4</td>\n",
       "      <td>小雨-中雨</td>\n",
       "      <td>中雨-大雨</td>\n",
       "      <td>20</td>\n",
       "      <td>13</td>\n",
       "      <td>无风向</td>\n",
       "      <td>无风向</td>\n",
       "      <td>≤3</td>\n",
       "      <td>≤3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020-04-24</td>\n",
       "      <td>5</td>\n",
       "      <td>中雨-大雨</td>\n",
       "      <td>阵雨</td>\n",
       "      <td>17</td>\n",
       "      <td>12</td>\n",
       "      <td>无风向</td>\n",
       "      <td>无风向</td>\n",
       "      <td>≤3</td>\n",
       "      <td>≤3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2020-04-25</td>\n",
       "      <td>6</td>\n",
       "      <td>阵雨</td>\n",
       "      <td>阵雨</td>\n",
       "      <td>20</td>\n",
       "      <td>15</td>\n",
       "      <td>无风向</td>\n",
       "      <td>无风向</td>\n",
       "      <td>≤3</td>\n",
       "      <td>≤3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2020-04-26</td>\n",
       "      <td>7</td>\n",
       "      <td>阵雨</td>\n",
       "      <td>多云</td>\n",
       "      <td>22</td>\n",
       "      <td>16</td>\n",
       "      <td>无风向</td>\n",
       "      <td>无风向</td>\n",
       "      <td>≤3</td>\n",
       "      <td>≤3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date week dayweather nightweather daytemp nighttemp daywind  \\\n",
       "0  2020-04-23    4      小雨-中雨        中雨-大雨      20        13     无风向   \n",
       "1  2020-04-24    5      中雨-大雨           阵雨      17        12     无风向   \n",
       "2  2020-04-25    6         阵雨           阵雨      20        15     无风向   \n",
       "3  2020-04-26    7         阵雨           多云      22        16     无风向   \n",
       "\n",
       "  nightwind daypower nightpower  \n",
       "0       无风向       ≤3         ≤3  \n",
       "1       无风向       ≤3         ≤3  \n",
       "2       无风向       ≤3         ≤3  \n",
       "3       无风向       ≤3         ≤3  "
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_温泉镇_weather=json_normalize(温泉镇_weather['forecasts'][0]['casts'])\n",
    "df_温泉镇_weather"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.0输入提示\n",
    "### 提供根据用户输入的关键词查询返回建议列表。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [],
   "source": [
    "def inputtips(keywords,type,location=None,city=None):\n",
    "    url = 'https://restapi.amap.com/v3/assistant/inputtips?parameters'\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'keywords':keywords,\n",
    "        'type':type,\n",
    "        'location':location,\n",
    "        'city':city,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '2',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'tips': [{'id': [],\n",
       "   'name': '武功山',\n",
       "   'district': [],\n",
       "   'adcode': [],\n",
       "   'location': [],\n",
       "   'address': [],\n",
       "   'typecode': [],\n",
       "   'city': []},\n",
       "  {'id': 'B031F00C38',\n",
       "   'name': '武功山国家级风景名胜区',\n",
       "   'district': '江西省萍乡市芦溪县',\n",
       "   'adcode': '360323',\n",
       "   'location': '114.228026,27.527942',\n",
       "   'address': '164县道',\n",
       "   'typecode': '110200',\n",
       "   'city': []}]}"
      ]
     },
     "execution_count": 70,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "inputtips('武功山','景点')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.1交通态势\n",
    "### 提供根据用户输入的内容能够返回希望查询的交通态势情况。\n",
    "目前支持城市：北京，上海，广州，深圳，宁波，武汉，重庆，成都，沈阳，南京，杭州，长春，常州，大连，东莞，福州，青岛，石家庄，天津，太原，西安，无锡，厦门，珠海，长沙，苏州，金华，佛山，济南，泉州，嘉兴，西宁，惠州，温州，中山，合肥，乌鲁木齐，台州，绍兴，昆明。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [],
   "source": [
    "def rectangle(rectangle,level=None,extensions=None):\n",
    "    url = 'https://restapi.amap.com/v3/traffic/status/rectangle?parameters'\n",
    "    params={\n",
    "        'key':key_wenpur,\n",
    "        'level':level,\n",
    "        'extensions':extensions,\n",
    "        'rectangle':rectangle,     \n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'trafficinfo': {'description': '北四环路：展春二桥附近自西向东严重拥堵。',\n",
       "  'evaluation': {'expedite': '84.62%',\n",
       "   'congested': '7.69%',\n",
       "   'blocked': '7.69%',\n",
       "   'unknown': '0.00%',\n",
       "   'status': '2',\n",
       "   'description': '轻度拥堵'}}}"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "交通态势 = rectangle(rectangle=\"116.351147,39.966309;116.357134,39.968727\")\n",
    "交通态势"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.2地理围栏\n",
    "### 地理围栏服务是一类HTTP接口，提供在服务端，增删改查地理围栏的功能，同时支持对于设备与围栏关系进行监控。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.2.0创建围栏"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': {'message': '新增围栏已存在', 'status': '106'},\n",
       " 'errcode': 0,\n",
       " 'errdetail': None,\n",
       " 'errmsg': 'OK',\n",
       " 'ext': None}"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 灵活参数\n",
    "def geofence(center,radius,valid_time=None,time=None,desc=None,alert_condition=None):\n",
    "    url='http://restapi.amap.com/v4/geofence/meta?key='+key_wenpur\n",
    "    params={\n",
    "        'name':\"测试围栏\",\n",
    "        'center':center,\n",
    "        'radius':radius,\n",
    "        'enable':'true',\n",
    "        'valid_time':valid_time,\n",
    "        'repeat':'Mon,Sun',\n",
    "        'time':time,\n",
    "        'desc':desc,\n",
    "        'alert_condition':alert_condition,\n",
    "    }\n",
    "    response = requests.post(url,json=params).json()\n",
    "    return response\n",
    "徐一_geofence=geofence(徐一_location,radius='1000',valid_time='2025-05-05')\n",
    "徐一_geofence"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': {'message': '新增围栏已存在', 'status': '106'},\n",
       " 'errcode': 0,\n",
       " 'errdetail': None,\n",
       " 'errmsg': 'OK',\n",
       " 'ext': None}"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 固定的参数\n",
    "def creat_wl():\n",
    "    parameters = {\n",
    "    \"name\":\"测试围栏\",\n",
    "    \"center\":\"112.827784,28.248466\",\n",
    "    \"radius\":\"1000\",\n",
    "    \"repeat\": \"Mon,Tues,Wed,Thur,Fri,Sat,Sun\",\n",
    "    \"enable\":\"true\",\n",
    "    \"valid_time\":\"2020-06-08\",\n",
    "    }\n",
    "    base = 'http://restapi.amap.com/v4/geofence/meta?key='+key_wenpur\n",
    "    answer = requests.post(base, json=parameters).json() \n",
    "    return answer  #字符串类型\n",
    "creat_wl()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'errcode': 20003,\n",
       " 'errdetail': '未知错误，请联系高德地图开放平台技术支持',\n",
       " 'errmsg': 'UNKNOWN_ERROR'}"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "def geofence(center,radius=None,valid_time=None,time=None,desc=None,alert_condition=None):\n",
    "    url='http://restapi.amap.com/v4/geofence/meta?key='+key_wenpur\n",
    "    parameters={\n",
    "        'name':\"测试围栏\",\n",
    "        'center':center,\n",
    "        'radius':'1000',\n",
    "        'enable':'true',\n",
    "        'valid_time':'2025-05-05',\n",
    "        'repeat':'Mon,Sun',\n",
    "        'time':time,\n",
    "        'desc':desc,\n",
    "        'alert_condition':alert_condition,\n",
    "    }\n",
    "#     header={\n",
    "#         'Content-Type':'application/json'\n",
    "#     }\n",
    "    params=json.dumps(parameters) # 将请求参数从dict转化为json\n",
    "    response = requests.post(url,params=params).json()\n",
    "    return response\n",
    "徐中_geofence=geofence(徐中_location)\n",
    "徐中_geofence"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "str"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 检测json.dumps类型\n",
    "parameters={\n",
    "    'name':\"测试围栏\",\n",
    "\n",
    "    'radius':'1000',\n",
    "    'enable':'true',\n",
    "    'valid_time':'2025-05-05',\n",
    "    'repeat':'Mon,Sun',\n",
    "}\n",
    "\n",
    "params=json.dumps(parameters)\n",
    "type(params)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.2.1查询围栏\n",
    "### 该接口可支持多种方式的围栏查询，同时可以对返回消息的分页方式进行设定。只能查询已经创建，未被删除的围栏。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': {'page_no': 1,\n",
       "  'page_size': 20,\n",
       "  'rs_list': [{'adcode': '0',\n",
       "    'alert_condition': '',\n",
       "    'center': '112.827784,28.248466',\n",
       "    'create_time': '2020-04-22 00:14:20',\n",
       "    'enable': True,\n",
       "    'fixed_date': '',\n",
       "    'gid': '2425f365-8fe6-47ac-b449-6a275764bcec',\n",
       "    'id': '0',\n",
       "    'key': '99161aee834f35a9b8b9b54b42b10f24',\n",
       "    'name': '测试围栏',\n",
       "    'points': '',\n",
       "    'radius': 1000.0,\n",
       "    'repeat': 'Mon,Tues,Wed,Thur,Fri,Sat,Sun',\n",
       "    'time': '00:00,23:59',\n",
       "    'valid_time': '2020-06-08'}],\n",
       "  'total_record': 1},\n",
       " 'errcode': 0,\n",
       " 'errdetail': None,\n",
       " 'errmsg': 'OK',\n",
       " 'ext': None}"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def geofence_check():\n",
    "  parameters = {\n",
    "  'key':key_wenpur,\n",
    "  'gid':'2425f365-8fe6-47ac-b449-6a275764bcec'\n",
    "  }\n",
    "  base = 'http://restapi.amap.com/v4/geofence/meta'\n",
    "  response = requests.get(base, parameters)\n",
    "  answer = response.json()\n",
    "  return answer\n",
    "geofence_check()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.2.2更新围栏"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': {'page_no': 1, 'page_size': 20, 'rs_list': [], 'total_record': 0},\n",
       " 'errcode': 0,\n",
       " 'errdetail': None,\n",
       " 'errmsg': 'OK',\n",
       " 'ext': None}"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def geofence_update():\n",
    "#     url='http://restapi.amap.com/v4/geofence/meta?key='+key_wenpur\n",
    "#     gid='2425f365-8fe6-47ac-b449-6a275764bcec'\n",
    "#     key='key_wenpur'\n",
    "    url='https://restapi.amap.com/v4/geofence/meta?method=patch&key='+key_wenpur\n",
    "    \n",
    "    params={\n",
    "       \n",
    "#         \"gid\":\"2425f365-8fe6-47ac-b449-6a275764bcec\",\n",
    "        \"name\": \"更新多边形围栏\",\n",
    "        \"points\":\"112.827784,28.248466;112.827784,29.248466;\",\n",
    "        \"valid_time\":\"2027-06-30\",\n",
    "        \"repeat\": \"Mon,Wed,Fri,Sat,Sun\",\n",
    "        \"time\": \"07:00,12:00;15:00,21:00\",\n",
    "        \"desc\": \"更新多边形围栏描述\",\n",
    "        \"alert_condition\": \"enter\"\n",
    "    }\n",
    "    response = requests.get(url,params)\n",
    "    answer = response.json()\n",
    "    return answer\n",
    "geofence_update()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 2.3轨迹纠偏\n",
    "### 根据坐标点抓取道路，即根据给定的坐标点、车辆的方位角以及行驶速度，将用户的轨迹纠偏到路上，从而返回用户实际驾车经过的道路坐标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': {'distance': 33.0,\n",
       "  'points': [{'x': 116.44942000249563, 'y': 40.014843356125866},\n",
       "   {'x': 116.44945705955585, 'y': 40.01453960973057}]},\n",
       " 'errcode': 0,\n",
       " 'errdetail': None,\n",
       " 'errmsg': 'OK',\n",
       " 'ext': None}"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用json参数转化字符串\n",
    "def grasproad():\n",
    "    url='https://restapi.amap.com/v4/grasproad/driving?key='+key_wenpur\n",
    "    body=[\n",
    "        {\n",
    "        \"x\": 116.449429,\n",
    "        \"y\": 40.014844,\n",
    "        \"sp\": 4,\n",
    "        \"ag\": 110,\n",
    "        \"tm\": 1478831753\n",
    "        }, {\n",
    "        \"x\": 116.449639,\n",
    "        \"y\": 40.014776,\n",
    "        \"sp\": 3,\n",
    "        \"ag\": 110,\n",
    "        \"tm\": 23\n",
    "        }, {\n",
    "        \"x\": 116.449859,\n",
    "        \"y\": 40.014716,\n",
    "        \"sp\": 3,\n",
    "        \"ag\": 111,\n",
    "        \"tm\": 33\n",
    "        }, {\n",
    "        \"x\": 116.450074,\n",
    "        \"y\": 40.014658,\n",
    "        \"sp\": 3,\n",
    "        \"ag\": 110,\n",
    "        \"tm\": 31\n",
    "        }, {\n",
    "        \"x\": 116.450273,\n",
    "        \"y\": 40.014598,\n",
    "        \"sp\": 3,\n",
    "        \"ag\": 111,\n",
    "        \"tm\": 20\n",
    "        }]\n",
    "        \n",
    "    response = requests.post(url,json=body)\n",
    "    answer = response.json()\n",
    "    return answer\n",
    "grasproad()    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': {'distance': 33.0,\n",
       "  'points': [{'x': 116.44942000249563, 'y': 40.014843356125866},\n",
       "   {'x': 116.44945705955585, 'y': 40.01453960973057}]},\n",
       " 'errcode': 0,\n",
       " 'errdetail': None,\n",
       " 'errmsg': 'OK',\n",
       " 'ext': None}"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用多行字符串''''''\n",
    "def grasproad():\n",
    "    url='https://restapi.amap.com/v4/grasproad/driving?key='+key_wenpur\n",
    "    body= '''\n",
    "    [\n",
    "        {\n",
    "        \"x\": 116.449429,\n",
    "        \"y\": 40.014844,\n",
    "        \"sp\": 4,\n",
    "        \"ag\": 110,\n",
    "        \"tm\": 1478831753\n",
    "        }, {\n",
    "        \"x\": 116.449639,\n",
    "        \"y\": 40.014776,\n",
    "        \"sp\": 3,\n",
    "        \"ag\": 110,\n",
    "        \"tm\": 23\n",
    "        }, {\n",
    "        \"x\": 116.449859,\n",
    "        \"y\": 40.014716,\n",
    "        \"sp\": 3,\n",
    "        \"ag\": 111,\n",
    "        \"tm\": 33\n",
    "        }, {\n",
    "        \"x\": 116.450074,\n",
    "        \"y\": 40.014658,\n",
    "        \"sp\": 3,\n",
    "        \"ag\": 110,\n",
    "        \"tm\": 31\n",
    "        }, {\n",
    "        \"x\": 116.450273,\n",
    "        \"y\": 40.014598,\n",
    "        \"sp\": 3,\n",
    "        \"ag\": 111,\n",
    "        \"tm\": 20\n",
    "        }]\n",
    "    '''\n",
    "        \n",
    "    response = requests.post(url,body)\n",
    "    answer = response.json()\n",
    "    return answer\n",
    "grasproad()    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 二、了解AI、ML\n",
    "* 人工智能(简称AI)是通过模拟人类行为，来智能地解决现实问题的各种过程。这些过程包括：学习、分析、计划、感知、推理、校正、语音识别、语言互动、和其他与人类认知科学相关的过程。\n",
    "* 机器学习(简称ML)是人工智能的一个分支，其旨在按照既定的步骤向系统馈入各种新的规则和行动参考信息。这些信息能够被系统通过自动学习，来不断地积累经验并实现“自我提升”。同时，那些由程序所生成的算法能够整合各种输入，并产生高效的输出。\n",
    "* 简单点一句话：ML是AI的一种实现方法。\n",
    "# 高德地图API背后的AI/ML\n",
    "地理编码、路径规划、行政区域、IP定位、批量请求接口等功能都是通过机器学习数据，然后分析、推理、校正等数据，返回适合的结果。比如路径规划，就是通过导入数据，机器学习、分析，再返回适合用户的路径规划。\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 三、设计调用API的应用\n",
    "\n",
    "1.产品描述：\n",
    "\n",
    "一款私人定制旅行的应用，用户把自己的需求输入进去，如想去的地方，想在那个地方经历什么，呆多少天等，从而为用户提供“省时省力又靠谱”的方案，而无需在网上查找一大堆攻略，或者去报旅游团等，就可以实现自己的私人旅游。\n",
    "\n",
    "如通过“路径规划”，用户去到一个陌生的城市可以方便的交通出行；“搜索POI”则可以让用户搜索当地著名的、有特色的的地方，真正走进当地，了解当地的风土人情，而不是走马观花乱走一遭；“天气查询”可以提前告知用户未来几天将要旅游目的地的情况，规划好路径、景点等。私人定制旅行主要是，用户要要\n",
    "\n",
    "2.需要使用的API：\n",
    "\n",
    "* 路径规划\n",
    "* 搜索POI\n",
    "* 静态地图\n",
    "* 天气查询\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
